MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / lock

Method lock

Source/3rdParty/bx/src/mutex.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 }
49
50 void Mutex::lock()
51 {
52 uint32_t* futex = (uint32_t*)m_internal;
53
54 if (State::Unlocked == atomicCompareAndSwap<uint32_t>(futex, State::Unlocked, State::Locked) )
55 {
56 return;
57 }
58
59 while (State::Unlocked != atomicCompareAndSwap<uint32_t>(futex, State::Locked, State::Contested) )
60 {
61 crt0::futexWait(futex, State::Contested);
62 }
63 }
64
65 void Mutex::unlock()
66 {

Callers 8

dispatchMethod · 0.45
getaddrinfo_with_timeoutFunction · 0.45
start_heartbeatMethod · 0.45
SDL_sysmutex.cppFile · 0.45
FlipMethod · 0.45
BeginUpdateMethod · 0.45
BeginReloadEffectMethod · 0.45
LockRenderingMethod · 0.45

Calls 1

pthread_mutex_lockFunction · 0.85

Tested by

no test coverage detected