This is an archive of the discontinued LLVM Phabricator instance.

Fix gettid warnings on FreeBSD
ClosedPublic

Authored by dim on Mar 23 2019, 7:40 AM.

Details

Summary

[Split off from D59451 to get this fix in separately]

While building the 8.0 releases on FreeBSD, I encountered the following
warnings in openmp quite a few times:

In file included from projects/openmp/runtime/src/kmp_settings.cpp:27:
projects/openmp/runtime/src/kmp_wrapper_getpid.h:35:2: warning: #warning is a language extension [-Wpedantic]
#warning No gettid found, use getpid instead
 ^
projects/openmp/runtime/src/kmp_wrapper_getpid.h:35:2: warning: No gettid found, use getpid instead [-W#warnings]
2 warnings generated.

I added a gettid wrapper that uses FreeBSD's pthread_getthreadid_np(3)
function for this.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

dim created this revision.Mar 23 2019, 7:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2019, 7:40 AM
Herald added subscribers: jdoerfert, jfb. · View Herald Transcript
This revision is now accepted and ready to land.Mar 25 2019, 10:32 AM
This revision was automatically updated to reflect the committed changes.