mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-14 19:27:56 -05:00
Kernel: New handle manager
This handle manager more closely mirrors the behaviour of the CTR-OS one. In addition object ref-counts and support for DuplicateHandle have been added. Note that support for DuplicateHandle is still experimental, since parts of the kernel still use Handles internally, which will likely cause troubles if two different handles to the same object are used to e.g. wait on a synchronization primitive.
This commit is contained in:
@ -57,7 +57,8 @@ ResultCode CreateSemaphore(Handle* handle, s32 initial_count,
|
||||
ErrorSummary::WrongArgument, ErrorLevel::Permanent);
|
||||
|
||||
Semaphore* semaphore = new Semaphore;
|
||||
*handle = g_handle_table.Create(semaphore);
|
||||
// TOOD(yuriks): Fix error reporting
|
||||
*handle = g_handle_table.Create(semaphore).ValueOr(INVALID_HANDLE);
|
||||
|
||||
// When the semaphore is created, some slots are reserved for other threads,
|
||||
// and the rest is reserved for the caller thread
|
||||
|
Reference in New Issue
Block a user