diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-01-14 07:51:39 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-01-14 07:51:39 +0000 |
commit | f4f51f2cc6fa936f0c65577f82e6b62989d546ee (patch) | |
tree | 34d2da3ba388fe5080f454868838454beab686b8 /lib/asan/asan_mac.cc | |
parent | 4785a776d09fb36bb2b162c3be40cd7ca017fce0 (diff) | |
download | compiler-rt-f4f51f2cc6fa936f0c65577f82e6b62989d546ee.tar.gz compiler-rt-f4f51f2cc6fa936f0c65577f82e6b62989d546ee.tar.bz2 compiler-rt-f4f51f2cc6fa936f0c65577f82e6b62989d546ee.tar.xz |
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
Diffstat (limited to 'lib/asan/asan_mac.cc')
-rw-r--r-- | lib/asan/asan_mac.cc | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/asan/asan_mac.cc b/lib/asan/asan_mac.cc index 12d4f5b8..03286179 100644 --- a/lib/asan/asan_mac.cc +++ b/lib/asan/asan_mac.cc @@ -141,25 +141,6 @@ void AsanPlatformThreadInit() { } } -AsanLock::AsanLock(LinkerInitialized) { - // We assume that OS_SPINLOCK_INIT is zero -} - -void AsanLock::Lock() { - CHECK(sizeof(OSSpinLock) <= sizeof(opaque_storage_)); - CHECK(OS_SPINLOCK_INIT == 0); - CHECK(owner_ != (uptr)pthread_self()); - OSSpinLockLock((OSSpinLock*)&opaque_storage_); - CHECK(!owner_); - owner_ = (uptr)pthread_self(); -} - -void AsanLock::Unlock() { - CHECK(owner_ == (uptr)pthread_self()); - owner_ = 0; - OSSpinLockUnlock((OSSpinLock*)&opaque_storage_); -} - void GetStackTrace(StackTrace *stack, uptr max_s, uptr pc, uptr bp, bool fast) { (void)fast; stack->size = 0; |