diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2021-08-03 16:30:08 +0200 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2021-08-04 13:44:19 +0200 |
commit | 636428c727cdcfe37b8e950e32d10f06fa4f5dfa (patch) | |
tree | ba6f2607f24f7a1f83d4588e0b7ac580eb266ab0 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 14e306fa4b0fb72710f2b696602fc356de59175d (diff) | |
download | llvm-636428c727cdcfe37b8e950e32d10f06fa4f5dfa.zip llvm-636428c727cdcfe37b8e950e32d10f06fa4f5dfa.tar.gz llvm-636428c727cdcfe37b8e950e32d10f06fa4f5dfa.tar.bz2 |
tsan: unify __cxa_guard_acquire and pthread_once implementations
Currently we effectively duplicate "once" logic for __cxa_guard_acquire
and pthread_once. Unify the implementations.
This is not a no-op change:
- constants used for pthread_once are changed to match __cxa_guard_acquire
(__cxa_guard_acquire constants are tied to ABI, but it does not seem
to be the case for pthread_once)
- pthread_once now also uses PotentiallyBlockingRegion annotations
- __cxa_guard_acquire checks thr->in_ignored_lib to skip user synchronization
It's unclear if these 2 differences are intentional or a mere sloppy inconsistency.
Since all tests still pass, let's assume the latter.
Reviewed By: vitalybuka, melver
Differential Revision: https://reviews.llvm.org/D107359
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions