summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorDavid CARLIER2020-07-20 11:25:36 +0200
committerPeter Maydell2020-07-20 12:35:17 +0200
commit8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718 (patch)
treebfa1c2ea089e96de9a9383805311adaadc17107e /util
parenthw/arm/virt: Disable memory hotplug when MTE is enabled (diff)
downloadqemu-8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718.tar.gz
qemu-8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718.tar.xz
qemu-8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718.zip
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