MCPcopy Create free account
hub / github.com/devkitPro/libctru / LightLock_Unlock

Function LightLock_Unlock

libctru/source/synchronization.c:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void LightLock_Unlock(LightLock* lock)
104{
105 __dmb();
106
107 s32 val;
108 do
109 val = -__ldrex(lock);
110 while (__strex(lock, val));
111
112 if (val > 1)
113 // Wake up exactly one thread
114 syncArbitrateAddress(lock, ARBITRATION_SIGNAL, 1);
115}
116
117void RecursiveLock_Init(RecursiveLock* lock)
118{

Callers 15

RecursiveLock_UnlockFunction · 0.85
CondVar_BeginWaitFunction · 0.85
LightEvent_ClearFunction · 0.85
LightEvent_SignalFunction · 0.85
gxCmdQueueInterruptFunction · 0.85
gxCmdQueueAddFunction · 0.85
gxCmdQueueRunFunction · 0.85
gxCmdQueueStopFunction · 0.85
ndspWaitForIrqFunction · 0.85
ndspUpdateMasterFunction · 0.85
ndspFinalizeFunction · 0.85
ndspSetMasterVolFunction · 0.85

Calls 4

__dmbFunction · 0.85
__ldrexFunction · 0.85
__strexFunction · 0.85
syncArbitrateAddressFunction · 0.85

Tested by

no test coverage detected