Add svcLockMutex

Just a shortcut, since most people probably want to lock a mutex for good until it's released
This commit is contained in:
Lectem 2015-02-25 15:13:32 +01:00
parent aa98a0796b
commit 0bba29051e

View File

@ -62,6 +62,7 @@ void __attribute__((noreturn)) svcExitThread();
void svcSleepThread(s64 ns); void svcSleepThread(s64 ns);
s32 svcSetThreadPriority(Handle thread, s32 prio); s32 svcSetThreadPriority(Handle thread, s32 prio);
s32 svcCreateMutex(Handle* mutex, bool initially_locked); s32 svcCreateMutex(Handle* mutex, bool initially_locked);
#define svcLockMutex(mutex) svcWaitSynchronization((mutex), U64_MAX)
s32 svcReleaseMutex(Handle handle); s32 svcReleaseMutex(Handle handle);
s32 svcCreateSemaphore(Handle* semaphore, s32 initial_count, s32 max_count); s32 svcCreateSemaphore(Handle* semaphore, s32 initial_count, s32 max_count);
s32 svcReleaseSemaphore(s32* count, Handle semaphore, s32 release_count); s32 svcReleaseSemaphore(s32* count, Handle semaphore, s32 release_count);