diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2024-05-30 20:42:47 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-06-04 10:02:39 +0200 |
commit | a4c2735f35b8b2bca5784ff9bf754a99b654c9a8 (patch) | |
tree | 5eac56cd5d5602122b8289d128f0ff12597da082 /include | |
parent | b8a208ccf51013a88eb410a7820a4951834a913f (diff) | |
download | qemu-a4c2735f35b8b2bca5784ff9bf754a99b654c9a8.zip qemu-a4c2735f35b8b2bca5784ff9bf754a99b654c9a8.tar.gz qemu-a4c2735f35b8b2bca5784ff9bf754a99b654c9a8.tar.bz2 |
cpu: move Qemu[Thread|Cond] setup into common code
Aside from the round robin threads this is all common code. By
moving the halt_cond setup we also no longer need hacks to work around
the race between QOM object creation and thread creation.
It is a little ugly to free stuff up for the round robin thread but
better it deal with its own specialises than making the other
accelerators jump through hoops.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20240530194250.1801701-3-alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/core/cpu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index be44746..a2c8536 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -404,10 +404,14 @@ struct qemu_work_item; * @tcg_cflags: Pre-computed cflags for this cpu. * @nr_cores: Number of cores within this CPU package. * @nr_threads: Number of threads within this CPU core. + * @thread: Host thread details, only live once @created is #true + * @sem: WIN32 only semaphore used only for qtest + * @thread_id: native thread id of vCPU, only live once @created is #true * @running: #true if CPU is currently running (lockless). * @has_waiter: #true if a CPU is currently waiting for the cpu_exec_end; * valid under cpu_list_lock. * @created: Indicates whether the CPU thread has been successfully created. + * @halt_cond: condition variable sleeping threads can wait on. * @interrupt_request: Indicates a pending interrupt request. * @halted: Nonzero if the CPU is in suspended state. * @stop: Indicates a pending stop request. |