Skip to content

Commit

Permalink
util: Implement qemu_get_thread_id() for OpenBSD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
devnexen authored and pm215 committed Jul 20, 2020
1 parent 19bd6aa commit 8edbca5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions util/oslib-posix.c
Expand Up @@ -100,6 +100,8 @@ int qemu_get_thread_id(void)
return (int)tid;
#elif defined(__NetBSD__)
return _lwp_self();
#elif defined(__OpenBSD__)
return getthrid();
#else
return getpid();
#endif
Expand Down

0 comments on commit 8edbca5

Please sign in to comment.