aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/kernel/event.cpp
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2014-12-21 10:04:08 -0200
committerGravatar Yuri Kunde Schlesner <yuriks@yuriks.net>2014-12-28 11:52:55 -0200
commit7e2903cb74050d846f2da951dff7e84aee13761b (patch)
tree621c9245d2dd393a9569b1b4192f50a27d831972 /src/core/hle/kernel/event.cpp
parent23f2142009e45b227867cefe40dfe9d338625974 (diff)
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.
Diffstat (limited to 'src/core/hle/kernel/event.cpp')
-rw-r--r--src/core/hle/kernel/event.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp
index 6a0e294c..e43c3ee4 100644
--- a/src/core/hle/kernel/event.cpp
+++ b/src/core/hle/kernel/event.cpp
@@ -129,7 +129,8 @@ ResultCode ClearEvent(Handle handle) {
Event* CreateEvent(Handle& handle, const ResetType reset_type, const std::string& name) {
Event* evt = new Event;
- handle = Kernel::g_handle_table.Create(evt);
+ // TOOD(yuriks): Fix error reporting
+ handle = Kernel::g_handle_table.Create(evt).ValueOr(INVALID_HANDLE);
evt->locked = true;
evt->permanent_locked = false;