aboutsummaryrefslogtreecommitdiff
path: root/linux-user/user-internals.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/user-internals.h')
-rw-r--r--linux-user/user-internals.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h
index 691b9a1..7099349 100644
--- a/linux-user/user-internals.h
+++ b/linux-user/user-internals.h
@@ -20,6 +20,8 @@
#include "user/thunk.h"
#include "qemu/log.h"
+#include "exec/tb-flush.h"
+#include "exec/translation-block.h"
extern char *exec_path;
void init_task_state(TaskState *ts);
@@ -172,6 +174,20 @@ static inline int regpairs_aligned(CPUArchState *cpu_env, int num) { return 0; }
*/
void preexit_cleanup(CPUArchState *env, int code);
+/**
+ * begin_parallel_context
+ * @cs: the CPU context
+ *
+ * Called when starting the second vcpu, or joining shared memory.
+ */
+static inline void begin_parallel_context(CPUState *cs)
+{
+ if (!tcg_cflags_has(cs, CF_PARALLEL)) {
+ tb_flush__exclusive_or_serial();
+ tcg_cflags_set(cs, CF_PARALLEL);
+ }
+}
+
/*
* Include target-specific struct and function definitions;
* they may need access to the target-independent structures