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

Function RecursiveLock_Lock

libctru/source/synchronization.c:124–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void RecursiveLock_Lock(RecursiveLock* lock)
125{
126 u32 tag = (u32)getThreadLocalStorage();
127 if (lock->thread_tag != tag)
128 {
129 LightLock_Lock(&lock->lock);
130 lock->thread_tag = tag;
131 }
132 lock->counter ++;
133}
134
135int RecursiveLock_TryLock(RecursiveLock* lock)
136{

Callers 1

Calls 2

getThreadLocalStorageFunction · 0.85
LightLock_LockFunction · 0.85

Tested by

no test coverage detected