diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-09-15 16:57:30 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-09-15 21:04:36 +0100 |
commit | ecbdfa8b314e2c17da17511b86371f552bffd441 (patch) | |
tree | caf0b2257c147e4c66f393c2f204f6e62800a994 /gcc/ginclude | |
parent | 29b39d4b0e44d350a35e5f25d9faeb9f9aac38e4 (diff) | |
download | gcc-ecbdfa8b314e2c17da17511b86371f552bffd441.zip gcc-ecbdfa8b314e2c17da17511b86371f552bffd441.tar.gz gcc-ecbdfa8b314e2c17da17511b86371f552bffd441.tar.bz2 |
libstdc++: Tweak TSan annotations for std::atomic<shared_ptr<T>>
Do not use the __tsan_mutex_not_static flag for annotation functions
where it's not a valid flag. Also use the try_lock and try_lock_failed
flags to more precisely annotate the CAS loop used to acquire a lock.
libstdc++-v3/ChangeLog:
* include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_PRE_LOCK):
Replace with ...
(_GLIBCXX_TSAN_MUTEX_TRY_LOCK): ... this, add try_lock flag.
(_GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED): New macro using
try_lock_failed flag
(_GLIBCXX_TSAN_MUTEX_POST_LOCK): Rename to ...
(_GLIBCXX_TSAN_MUTEX_LOCKED): ... this.
(_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK): Remove invalid flag.
(_GLIBCXX_TSAN_MUTEX_POST_UNLOCK): Remove invalid flag.
(_Sp_atomic::_Atomic_count::lock): Use new macros.
Diffstat (limited to 'gcc/ginclude')
0 files changed, 0 insertions, 0 deletions