Skip to content

Commit 8edbca5

Browse files
devnexenpm215
authored andcommitted
util: Implement qemu_get_thread_id() for OpenBSD
Implement qemu_get_thread_id() for OpenBSD hosts, using getthrid(). Signed-off-by: David Carlier <[email protected]> Reviewed-by: Brad Smith <[email protected]> Message-id: CA+XhMqxD6gQDBaj8tX0CMEj3si7qYKsM8u1km47e_-U7MC37Pg@mail.gmail.com Reviewed-by: Peter Maydell <[email protected]> [PMM: tidied up commit message] Signed-off-by: Peter Maydell <[email protected]>
1 parent 19bd6aa commit 8edbca5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

util/oslib-posix.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ int qemu_get_thread_id(void)
100100
return (int)tid;
101101
#elif defined(__NetBSD__)
102102
return _lwp_self();
103+
#elif defined(__OpenBSD__)
104+
return getthrid();
103105
#else
104106
return getpid();
105107
#endif

0 commit comments

Comments
 (0)