aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2020-07-20 10:25:36 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-20 11:35:17 +0100
commit8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718 (patch)
treebfa1c2ea089e96de9a9383805311adaadc17107e /util
parent19bd6aafbd184be963d2b7c24874e3252a7088b7 (diff)
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>
Diffstat (limited to 'util')
-rw-r--r--util/oslib-posix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 36bf8593f8..d923674624 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -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