MCPcopy Create free account
hub / github.com/apache/impala / Lock

Function Lock

be/src/gutil/spinlock.h:72–78  ·  view source on GitHub ↗

Acquire this SpinLock. TODO(csilvers): uncomment the annotation when we figure out how to support this macro with 0 args (see thread_annotations.h)

Source from the content-addressed store, hash-verified

70 // TODO(csilvers): uncomment the annotation when we figure out how to
71 // support this macro with 0 args (see thread_annotations.h)
72 inline void Lock() /*EXCLUSIVE_LOCK_FUNCTION()*/ {
73 if (base::subtle::Acquire_CompareAndSwap(&lockword_, kSpinLockFree,
74 kSpinLockHeld) != kSpinLockFree) {
75 SlowLock();
76 }
77 ANNOTATE_RWLOCK_ACQUIRED(this, 1);
78 }
79
80 // Try to acquire this SpinLock without blocking and return true if the
81 // acquisition was successful. If the lock was not acquired, false is

Callers 4

DbConnectionClass · 0.85
__init__Method · 0.85
__init__Method · 0.85
setup_methodMethod · 0.85

Calls 1

Acquire_CompareAndSwapFunction · 0.70

Tested by 1

setup_methodMethod · 0.68