Skip to content

[OpenMP] Use pthread_self for __kmp_gettid on Solaris #138510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025

Conversation

rorth
Copy link
Collaborator

@rorth rorth commented May 5, 2025

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.

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`.
@rorth rorth requested review from MaskRay and brad0 May 5, 2025 11:44
@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label May 5, 2025
@rorth rorth merged commit 30ec488 into llvm:main May 6, 2025
11 checks passed
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants