mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-16 14:41:55 -06:00
bsd-user: Add stop_all_tasks
Similar to the same function in linux-user: this stops all the current tasks. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
This commit is contained in:
parent
7aac739234
commit
653ccec26d
2 changed files with 10 additions and 0 deletions
|
@ -195,6 +195,15 @@ static void usage(void)
|
|||
|
||||
__thread CPUState *thread_cpu;
|
||||
|
||||
void stop_all_tasks(void)
|
||||
{
|
||||
/*
|
||||
* We trust when using NPTL (pthreads) start_exclusive() handles thread
|
||||
* stopping correctly.
|
||||
*/
|
||||
start_exclusive();
|
||||
}
|
||||
|
||||
bool qemu_cpu_is_self(CPUState *cpu)
|
||||
{
|
||||
return thread_cpu == cpu;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue