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

Function LightEvent_TryReset

libctru/source/synchronization.c:241–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241static inline int LightEvent_TryReset(LightEvent* event)
242{
243 __dmb();
244 do
245 {
246 if (__ldrex(&event->state))
247 {
248 __clrex();
249 return 0;
250 }
251 } while (__strex(&event->state, CLEARED_ONESHOT));
252 __dmb();
253 return 1;
254}
255
256void LightEvent_Init(LightEvent* event, ResetType reset_type)
257{

Callers 3

LightEvent_TryWaitFunction · 0.85
LightEvent_WaitFunction · 0.85
LightEvent_WaitTimeoutFunction · 0.85

Calls 4

__dmbFunction · 0.85
__ldrexFunction · 0.85
__clrexFunction · 0.85
__strexFunction · 0.85

Tested by

no test coverage detected