From 8f0c5bdd9650256501bad9fc5dedc977f4ca2247 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 25 Oct 2013 23:03:21 +0000 Subject: Rename SpinMutex::AssertHeld to CheckLocked, for consistency with BlockingMutex. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193447 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_allocator.h | 2 +- lib/sanitizer_common/sanitizer_mutex.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sanitizer_common/sanitizer_allocator.h b/lib/sanitizer_common/sanitizer_allocator.h index 0e99d298..6075cfe9 100644 --- a/lib/sanitizer_common/sanitizer_allocator.h +++ b/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(ptr); uptr n = n_chunks_; if (!n) return 0; diff --git a/lib/sanitizer_common/sanitizer_mutex.h b/lib/sanitizer_common/sanitizer_mutex.h index 0f05f67f..e812fce9 100644 --- a/lib/sanitizer_common/sanitizer_mutex.h +++ b/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); } -- cgit v1.2.3