MCPcopy Create free account
hub / github.com/apple/foundationdb / enter

Method enter

flow/include/flow/ThreadPrimitives.h:65–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63#endif
64 }
65 void enter() {
66 while (isLocked.test_and_set(std::memory_order_acquire))
67#if defined(__aarch64__)
68 __asm__ volatile("isb");
69#elif defined(__powerpc64__)
70 __asm__ volatile("or 27,27,27" ::: "memory");
71#else
72 _mm_pause();
73#endif
74#if VALGRIND
75 ANNOTATE_RWLOCK_ACQUIRED(this, true);
76#endif
77 }
78 void leave() {
79 isLocked.clear(std::memory_order_release);
80#if VALGRIND

Callers 7

trySendErrorMethod · 0.45
callOrSetAsCallbackMethod · 0.45
clearCallbackMethod · 0.45
sendMethod · 0.45
setMethod · 0.45
ThreadSpinLockHolderMethod · 0.45
MutexHolderMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected