Skip to content

Commit fe577fa

Browse files
rorthGeorgeARM
authored andcommitted
[OpenMP] Use pthread_self for __kmp_gettid on Solaris (llvm#138510)
Building `openmp` on Solaris/amd64, I get ``` In file included from openmp/runtime/src/kmp_utility.cpp:16: openmp/runtime/src/kmp_wrapper_getpid.h:47:2: warning: No gettid found, use getpid instead [-W#warnings] 47 | #warning No gettid found, use getpid instead | ^ ``` There's no reason to do this: Solaris can use `pthread_self` just as AIX does. Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.
1 parent 0315514 commit fe577fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openmp/runtime/src/kmp_wrapper_getpid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#define __kmp_gettid() _lwp_self()
3434
#elif KMP_OS_OPENBSD
3535
#define __kmp_gettid() getthrid()
36-
#elif KMP_OS_AIX
36+
#elif KMP_OS_AIX || KMP_OS_SOLARIS
3737
#include <pthread.h>
3838
#define __kmp_gettid() pthread_self()
3939
#elif KMP_OS_HAIKU

0 commit comments

Comments
 (0)