]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
util: Implement qemu_get_thread_id() for OpenBSD
authorDavid CARLIER <devnexen@gmail.com>
Mon, 20 Jul 2020 09:25:36 +0000 (10:25 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 20 Jul 2020 10:35:17 +0000 (11:35 +0100)
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>
util/oslib-posix.c

index 36bf8593f8c1ff13582a2f79a4ea75fe16cbf23a..d92367462480646735a2f1ade74f53917b79632a 100644 (file)
@@ -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