diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-25 23:03:21 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-25 23:03:21 +0000 |
| commit | 8d27910d7d72bf315e589e78affc29466e45cde5 (patch) | |
| tree | 7857294c04d2301efe473603be991cc8e9820a20 /compiler-rt/lib/sanitizer_common | |
| parent | 8870301763103f6686fcc5f17ed7dd52543e2ffd (diff) | |
| download | bcm5719-llvm-8d27910d7d72bf315e589e78affc29466e45cde5.tar.gz bcm5719-llvm-8d27910d7d72bf315e589e78affc29466e45cde5.zip | |
Rename SpinMutex::AssertHeld to CheckLocked, for consistency with BlockingMutex.
llvm-svn: 193447
Diffstat (limited to 'compiler-rt/lib/sanitizer_common')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_allocator.h | 2 | ||||
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_mutex.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h index 0e99d298f7c..6075cfe92aa 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h @@ -1051,7 +1051,7 @@ class LargeMmapAllocator { // This function does the same as GetBlockBegin, but is much faster. // Must be called with the allocator locked. void *GetBlockBeginFastLocked(void *ptr) { - mutex_.AssertHeld(); + mutex_.CheckLocked(); uptr p = reinterpret_cast<uptr>(ptr); uptr n = n_chunks_; if (!n) return 0; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h b/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h index 0f05f67f0ee..e812fce9059 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_mutex.h @@ -40,7 +40,7 @@ class StaticSpinMutex { atomic_store(&state_, 0, memory_order_release); } - void AssertHeld() { + void CheckLocked() { CHECK_EQ(atomic_load(&state_, memory_order_relaxed), 1); } |

