b254c342cf
Access the CPUState::tcg_cflags via tcg_cflags_has() and tcg_cflags_set() helpers. Mechanical change using the following Coccinelle spatch script: @@ expression cpu; expression flags; @@ - cpu->tcg_cflags & flags + tcg_cflags_has(cpu, flags) @@ expression cpu; expression flags; @@ - (tcg_cflags_has(cpu, flags)) + tcg_cflags_has(cpu, flags) @@ expression cpu; expression flags; @@ - cpu->tcg_cflags |= flags; + tcg_cflags_set(cpu, flags); Then manually moving the declarations, and adding both tcg_cflags_has() and tcg_cflags_set() definitions. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240427155714.53669-15-philmd@linaro.org>
28 lines
647 B
C
28 lines
647 B
C
/*
|
|
* Internal execution defines for qemu (target agnostic)
|
|
*
|
|
* Copyright (c) 2003 Fabrice Bellard
|
|
*
|
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
|
*/
|
|
|
|
#ifndef ACCEL_TCG_INTERNAL_COMMON_H
|
|
#define ACCEL_TCG_INTERNAL_COMMON_H
|
|
|
|
#include "exec/cpu-common.h"
|
|
#include "exec/translation-block.h"
|
|
|
|
extern int64_t max_delay;
|
|
extern int64_t max_advance;
|
|
|
|
/*
|
|
* Return true if CS is not running in parallel with other cpus, either
|
|
* because there are no other cpus or we are within an exclusive context.
|
|
*/
|
|
static inline bool cpu_in_serial_context(CPUState *cs)
|
|
{
|
|
return !tcg_cflags_has(cs, CF_PARALLEL) || cpu_in_exclusive_context(cs);
|
|
}
|
|
|
|
#endif
|