diff options
author | David CARLIER <devnexen@gmail.com> | 2020-07-20 10:25:36 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-07-20 11:35:17 +0100 |
commit | 8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718 (patch) | |
tree | bfa1c2ea089e96de9a9383805311adaadc17107e /util/oslib-posix.c | |
parent | 19bd6aafbd184be963d2b7c24874e3252a7088b7 (diff) | |
download | qemu-8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718.zip qemu-8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718.tar.gz qemu-8edbca515c20bdbb3d2dca3c60dcc5b8ca4fc718.tar.bz2 |
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/oslib-posix.c')
-rw-r--r-- | util/oslib-posix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 36bf859..d923674 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 |