xref: /openbmc/qemu/accel/tcg/internal-common.h (revision 259ebed4)
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 void dump_exec_info(GString *buf);
18 
19 /*
20  * Return true if CS is not running in parallel with other cpus, either
21  * because there are no other cpus or we are within an exclusive context.
22  */
23 static inline bool cpu_in_serial_context(CPUState *cs)
24 {
25     return !(cs->tcg_cflags & CF_PARALLEL) || cpu_in_exclusive_context(cs);
26 }
27 
28 #endif
29