forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
29 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters