Merge pull request #45 from Subv/semaphores
Added svcReleaseSemaphore and svcCreateSemaphore
This commit is contained in:
commit
a9f68cde3b
@ -62,6 +62,8 @@ void svcSleepThread(s64 ns);
|
||||
s32 svcSetThreadPriority(Handle thread, s32 prio);
|
||||
s32 svcCreateMutex(Handle* mutex, bool initially_locked);
|
||||
s32 svcReleaseMutex(Handle handle);
|
||||
s32 svcCreateSemaphore(Handle* semaphore, s32 initial_count, s32 max_count);
|
||||
s32 svcReleaseSemaphore(s32* count, Handle semaphore, s32 release_count);
|
||||
s32 svcCreateEvent(Handle* event, u8 reset_type);
|
||||
s32 svcSignalEvent(Handle handle);
|
||||
s32 svcClearEvent(Handle handle);
|
||||
|
@ -264,3 +264,21 @@ svcOutputDebugString:
|
||||
ldr r2, [sp], #4
|
||||
str r1, [r2]
|
||||
bx lr
|
||||
|
||||
.global svcCreateSemaphore
|
||||
.type svcCreateSemaphore, %function
|
||||
svcCreateSemaphore:
|
||||
push {r0}
|
||||
svc 0x15
|
||||
pop {r3}
|
||||
str r1, [r3]
|
||||
bx lr
|
||||
|
||||
.global svcReleaseSemaphore
|
||||
.type svcReleaseSemaphore, %function
|
||||
svcReleaseSemaphore:
|
||||
push {r0}
|
||||
svc 0x16
|
||||
pop {r3}
|
||||
str r1, [r3]
|
||||
bx lr
|
Loading…
Reference in New Issue
Block a user