From f4f51f2cc6fa936f0c65577f82e6b62989d546ee Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 14 Jan 2013 07:51:39 +0000 Subject: asan/tsan: move blocking mutex from asan to sanitizer_common git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172380 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_mutex.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/sanitizer_common/sanitizer_mutex.h') diff --git a/lib/sanitizer_common/sanitizer_mutex.h b/lib/sanitizer_common/sanitizer_mutex.h index 4372a73c1..15e1caa1b 100644 --- a/lib/sanitizer_common/sanitizer_mutex.h +++ b/lib/sanitizer_common/sanitizer_mutex.h @@ -67,6 +67,15 @@ class SpinMutex : public StaticSpinMutex { void operator=(const SpinMutex&); }; +class BlockingMutex { + public: + explicit BlockingMutex(LinkerInitialized); + void Lock(); + void Unlock(); + private: + uptr opaque_storage_[10]; +}; + template class GenericScopedLock { public: @@ -106,6 +115,7 @@ class GenericScopedReadLock { }; typedef GenericScopedLock SpinMutexLock; +typedef GenericScopedLock BlockingMutexLock; } // namespace __sanitizer -- cgit v1.2.1