mutex: refactored the interface to code to return a Mutex* handle
This commit is contained in:
parent
978e1d4653
commit
eb537c560a
4 changed files with 16 additions and 5 deletions
|
@ -188,7 +188,7 @@ Result CreateThread(void* thread, u32 priority, u32 entry_point, u32 arg, u32 st
|
|||
Result CreateMutex(void* _mutex, u32 initial_locked) {
|
||||
Handle* mutex = (Handle*)_mutex;
|
||||
DEBUG_LOG(SVC, "CreateMutex called initial_locked=%s", initial_locked ? "true" : "false");
|
||||
Kernel::CreateMutex(*mutex, (bool)initial_locked);
|
||||
*mutex = Kernel::CreateMutex((initial_locked != 0));
|
||||
Core::g_app_core->SetReg(1, *mutex);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue