xref: /openbmc/qemu/accel/tcg/internal-common.h (revision 8a8be21d)
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/translation-block.h"
13 
14 extern int64_t max_delay;
15 extern int64_t max_advance;
16 
17 /*
18  * Return true if CS is not running in parallel with other cpus, either
19  * because there are no other cpus or we are within an exclusive context.
20  */
21 static inline bool cpu_in_serial_context(CPUState *cs)
22 {
23     return !(cs->tcg_cflags & CF_PARALLEL) || cpu_in_exclusive_context(cs);
24 }
25 
26 #endif
27