Add __sync_get_arbiter.

This commit is contained in:
Steven Smith 2015-12-28 20:46:04 -08:00
parent aca183a47b
commit 74a58330e8
2 changed files with 11 additions and 0 deletions

View File

@ -59,6 +59,12 @@ static inline bool __strex(s32* addr, s32 val)
/// Performs an atomic swap operation. /// Performs an atomic swap operation.
#define AtomicSwap(ptr, value) __atomic_exchange_n((u32*)(ptr), (value), __ATOMIC_SEQ_CST) #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. * @brief Initializes a light lock.
* @param lock Pointer to the lock. * @param lock Pointer to the lock.

View File

@ -16,6 +16,11 @@ void __sync_fini(void)
svcCloseHandle(arbiter); svcCloseHandle(arbiter);
} }
Handle __sync_get_arbiter(void)
{
return arbiter;
}
void LightLock_Init(LightLock* lock) void LightLock_Init(LightLock* lock)
{ {
do do