diff options
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 107d12156..2846bb482 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -291,10 +291,17 @@ static Result GetThreadId(u32* thread_id, Handle handle) { | |||
| 291 | 291 | ||
| 292 | /// Creates a semaphore | 292 | /// Creates a semaphore |
| 293 | static Result CreateSemaphore(Handle* semaphore, s32 initial_count, s32 max_count) { | 293 | static Result CreateSemaphore(Handle* semaphore, s32 initial_count, s32 max_count) { |
| 294 | *semaphore = Kernel::CreateSemaphore(initial_count, max_count); | 294 | ResultCode res = Kernel::CreateSemaphore(semaphore, initial_count, max_count); |
| 295 | DEBUG_LOG(SVC, "called initial_count=%d, max_count=%d, created handle=0x%08X", | 295 | DEBUG_LOG(SVC, "called initial_count=%d, max_count=%d, created handle=0x%08X", |
| 296 | initial_count, max_count, *semaphore); | 296 | initial_count, max_count, *semaphore); |
| 297 | return 0; | 297 | return res.raw; |
| 298 | } | ||
| 299 | |||
| 300 | /// Releases a certain number of slots in a semaphore | ||
| 301 | static Result ReleaseSemaphore(s32* count, Handle semaphore, s32 release_count) { | ||
| 302 | DEBUG_LOG(SVC, "called release_count=%d, handle=0x%08X", release_count, semaphore); | ||
| 303 | ResultCode res = Kernel::ReleaseSemaphore(count, semaphore, release_count); | ||
| 304 | return res.raw; | ||
| 298 | } | 305 | } |
| 299 | 306 | ||
| 300 | /// Query memory | 307 | /// Query memory |
| @@ -376,7 +383,7 @@ const HLE::FunctionDef SVC_Table[] = { | |||
| 376 | {0x13, HLE::Wrap<CreateMutex>, "CreateMutex"}, | 383 | {0x13, HLE::Wrap<CreateMutex>, "CreateMutex"}, |
| 377 | {0x14, HLE::Wrap<ReleaseMutex>, "ReleaseMutex"}, | 384 | {0x14, HLE::Wrap<ReleaseMutex>, "ReleaseMutex"}, |
| 378 | {0x15, HLE::Wrap<CreateSemaphore>, "CreateSemaphore"}, | 385 | {0x15, HLE::Wrap<CreateSemaphore>, "CreateSemaphore"}, |
| 379 | {0x16, nullptr, "ReleaseSemaphore"}, | 386 | {0x16, HLE::Wrap<ReleaseSemaphore>, "ReleaseSemaphore"}, |
| 380 | {0x17, HLE::Wrap<CreateEvent>, "CreateEvent"}, | 387 | {0x17, HLE::Wrap<CreateEvent>, "CreateEvent"}, |
| 381 | {0x18, HLE::Wrap<SignalEvent>, "SignalEvent"}, | 388 | {0x18, HLE::Wrap<SignalEvent>, "SignalEvent"}, |
| 382 | {0x19, HLE::Wrap<ClearEvent>, "ClearEvent"}, | 389 | {0x19, HLE::Wrap<ClearEvent>, "ClearEvent"}, |