mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 02:15:45 +00: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:
parent
23f2142009
commit
7e2903cb74
13 changed files with 229 additions and 188 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue