From: David CARLIER Date: Mon, 20 Jul 2020 09:25:36 +0000 (+0100) Subject: util: Implement qemu_get_thread_id() for OpenBSD X-Git-Tag: qemu-xen-4.15.0~52^2~8 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718;p=qemu-xen.git util: Implement qemu_get_thread_id() for OpenBSD Implement qemu_get_thread_id() for OpenBSD hosts, using getthrid(). Signed-off-by: David Carlier Reviewed-by: Brad Smith Message-id: CA+XhMqxD6gQDBaj8tX0CMEj3si7qYKsM8u1km47e_-U7MC37Pg@mail.gmail.com Reviewed-by: Peter Maydell [PMM: tidied up commit message] Signed-off-by: Peter Maydell --- 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