Skip to content

Commit

Permalink
[OpenMP] Use the more appropriate function to retrieve the thread id …
Browse files Browse the repository at this point in the history
…on OpenBSD (llvm#65553)

Use the getthrid() function instead of a syscall.

(cherry picked from commit 7e31b45)
  • Loading branch information
brad0 authored and tru committed Oct 30, 2023
1 parent 8909a24 commit 2b82ec7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmp/runtime/src/kmp_wrapper_getpid.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <lwp.h>
#define __kmp_gettid() _lwp_self()
#elif KMP_OS_OPENBSD
#define __kmp_gettid() syscall(SYS_getthrid)
#define __kmp_gettid() getthrid()
#elif defined(SYS_gettid)
// Hopefully other Unix systems define SYS_gettid syscall for getting os thread
// id
Expand Down

0 comments on commit 2b82ec7

Please sign in to comment.