[compiler-rt] r193447 - Rename SpinMutex::AssertHeld to CheckLocked, for consistency with BlockingMutex.
Peter Collingbourne
peter at pcc.me.uk
Fri Oct 25 16:03:21 PDT 2013
Author: pcc
Date: Fri Oct 25 18:03:21 2013
New Revision: 193447
URL: http://llvm.org/viewvc/llvm-project?rev=193447&view=rev
Log:
Rename SpinMutex::AssertHeld to CheckLocked, for consistency with BlockingMutex.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_mutex.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h?rev=193447&r1=193446&r2=193447&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.h Fri Oct 25 18:03:21 2013
@@ -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;
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_mutex.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_mutex.h?rev=193447&r1=193446&r2=193447&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_mutex.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_mutex.h Fri Oct 25 18:03:21 2013
@@ -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);
}
More information about the llvm-commits
mailing list