Merge pull request #235 from Steveice10/master

Add __sync_get_arbiter.
This commit is contained in:
fincs 2015-12-29 12:02:11 +01:00
commit 9fee423e8a
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.
#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.

View File

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