xref: /openbmc/qemu/accel/tcg/internal-common.h (revision b254c342)
1 /*
2  * Internal execution defines for qemu (target agnostic)
3  *
4  *  Copyright (c) 2003 Fabrice Bellard
5  *
6  * SPDX-License-Identifier: LGPL-2.1-or-later
7  */
8 
9 #ifndef ACCEL_TCG_INTERNAL_COMMON_H
10 #define ACCEL_TCG_INTERNAL_COMMON_H
11 
12 #include "exec/cpu-common.h"
13 #include "exec/translation-block.h"
14 
15 extern int64_t max_delay;
16 extern int64_t max_advance;
17 
18 /*
19  * Return true if CS is not running in parallel with other cpus, either
20  * because there are no other cpus or we are within an exclusive context.
21  */
22 static inline bool cpu_in_serial_context(CPUState *cs)
23 {
24     return !tcg_cflags_has(cs, CF_PARALLEL) || cpu_in_exclusive_context(cs);
25 }
26 
27 #endif
28