diff --git a/libctru/include/3ds/synchronization.h b/libctru/include/3ds/synchronization.h index d6dc068..0307745 100644 --- a/libctru/include/3ds/synchronization.h +++ b/libctru/include/3ds/synchronization.h @@ -59,6 +59,12 @@ static inline bool __strex(s32* addr, s32 val) /// Performs an atomic swap operation. #define AtomicSwap(ptr, value) __atomic_exchange_n((u32*)(ptr), (value), __ATOMIC_SEQ_CST) +/** + * @brief Retrieves the synchronization subsystem's address arbiter handle. + * @return The synchronization subsystem's address arbiter handle. + */ +Handle __sync_get_arbiter(void); + /** * @brief Initializes a light lock. * @param lock Pointer to the lock. diff --git a/libctru/source/synchronization.c b/libctru/source/synchronization.c index 0dca724..ecbae16 100644 --- a/libctru/source/synchronization.c +++ b/libctru/source/synchronization.c @@ -16,6 +16,11 @@ void __sync_fini(void) svcCloseHandle(arbiter); } +Handle __sync_get_arbiter(void) +{ + return arbiter; +} + void LightLock_Init(LightLock* lock) { do