diff options
Diffstat (limited to 'absl/base')
-rw-r--r-- | absl/base/internal/spinlock.cc | 4 | ||||
-rw-r--r-- | absl/base/internal/spinlock.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/absl/base/internal/spinlock.cc b/absl/base/internal/spinlock.cc index 517668dccc4c..3ac1f4dc96c3 100644 --- a/absl/base/internal/spinlock.cc +++ b/absl/base/internal/spinlock.cc @@ -91,12 +91,12 @@ static inline bool IsCooperative( // Uncommon constructors. SpinLock::SpinLock(base_internal::SchedulingMode mode) : lockword_(IsCooperative(mode) ? kSpinLockCooperative : 0) { - ABSL_TSAN_MUTEX_CREATE(this, 0); + ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static); } SpinLock::SpinLock(base_internal::LinkerInitialized, base_internal::SchedulingMode mode) { - ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_linker_init); + ABSL_TSAN_MUTEX_CREATE(this, 0); if (IsCooperative(mode)) { InitLinkerInitializedAndCooperative(); } diff --git a/absl/base/internal/spinlock.h b/absl/base/internal/spinlock.h index 1f50d745919b..f486f68a04f9 100644 --- a/absl/base/internal/spinlock.h +++ b/absl/base/internal/spinlock.h @@ -50,7 +50,7 @@ namespace base_internal { class LOCKABLE SpinLock { public: SpinLock() : lockword_(kSpinLockCooperative) { - ABSL_TSAN_MUTEX_CREATE(this, 0); + ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static); } // Special constructor for use with static SpinLock objects. E.g., @@ -64,7 +64,7 @@ class LOCKABLE SpinLock { // initializers run. explicit SpinLock(base_internal::LinkerInitialized) { // Does nothing; lockword_ is already initialized - ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_linker_init); + ABSL_TSAN_MUTEX_CREATE(this, 0); } // Constructors that allow non-cooperative spinlocks to be created for use @@ -73,7 +73,7 @@ class LOCKABLE SpinLock { SpinLock(base_internal::LinkerInitialized, base_internal::SchedulingMode mode); - ~SpinLock() { ABSL_TSAN_MUTEX_DESTROY(this, 0); } + ~SpinLock() { ABSL_TSAN_MUTEX_DESTROY(this, __tsan_mutex_not_static); } // Acquire this SpinLock. inline void Lock() EXCLUSIVE_LOCK_FUNCTION() { |