mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
util: Implement qemu_get_thread_id() for OpenBSD
Implement qemu_get_thread_id() for OpenBSD hosts, using getthrid(). Signed-off-by: David Carlier <devnexen@gmail.com> Reviewed-by: Brad Smith <brad@comstyle.com> Message-id: CA+XhMqxD6gQDBaj8tX0CMEj3si7qYKsM8u1km47e_-U7MC37Pg@mail.gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: tidied up commit message] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
19bd6aafbd
commit
8edbca515c
1 changed files with 2 additions and 0 deletions
|
@ -100,6 +100,8 @@ int qemu_get_thread_id(void)
|
||||||
return (int)tid;
|
return (int)tid;
|
||||||
#elif defined(__NetBSD__)
|
#elif defined(__NetBSD__)
|
||||||
return _lwp_self();
|
return _lwp_self();
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
return getthrid();
|
||||||
#else
|
#else
|
||||||
return getpid();
|
return getpid();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue