mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Refactor thread retrieval and check
We have qemu_cpu_self and qemu_thread_self. The latter is retrieving the current thread, the former is checking for equality (using CPUState). We also have qemu_thread_equal which is only used like qemu_cpu_self. This refactors the interfaces, creating qemu_cpu_is_self and qemu_thread_is_self as well ass qemu_thread_get_self. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
68c23e5520
commit
b7680cb607
7 changed files with 18 additions and 24 deletions
|
@ -37,8 +37,8 @@ void qemu_thread_create(QemuThread *thread,
|
|||
void *(*start_routine)(void*),
|
||||
void *arg);
|
||||
void qemu_thread_signal(QemuThread *thread, int sig);
|
||||
void qemu_thread_self(QemuThread *thread);
|
||||
int qemu_thread_equal(QemuThread *thread1, QemuThread *thread2);
|
||||
void qemu_thread_get_self(QemuThread *thread);
|
||||
int qemu_thread_is_self(QemuThread *thread);
|
||||
void qemu_thread_exit(void *retval);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue