diff options
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/kernel/kernel.h | 1 | ||||
-rw-r--r-- | src/core/hle/kernel/session.h | 8 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 6f1dced70..692349857 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -39,7 +39,7 @@ Thread* WaitObject::ReleaseNextThread() { next_thread->ReleaseWaitObject(this); - return next_thread.get(); + return next_thread; } void WaitObject::WakeupAllWaitingThreads() { diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index a9a893f41..ca9ccf4bf 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -71,6 +71,7 @@ public: */ bool IsWaitable() const { switch (GetHandleType()) { + case HandleType::Session: case HandleType::Event: case HandleType::Mutex: case HandleType::Thread: diff --git a/src/core/hle/kernel/session.h b/src/core/hle/kernel/session.h index 91f3ffc2c..e11f727a5 100644 --- a/src/core/hle/kernel/session.h +++ b/src/core/hle/kernel/session.h @@ -41,7 +41,7 @@ inline static u32* GetCommandBuffer(const int offset=0) { * CTR-OS so that IPC calls can be optionally handled by the real implementations of processes, as * opposed to HLE simulations. */ -class Session : public Object { +class Session : public WaitObject { public: std::string GetTypeName() const override { return "Session"; } @@ -53,6 +53,12 @@ public: * aren't supported yet. */ virtual ResultVal<bool> SyncRequest() = 0; + + ResultVal<bool> Wait() override { + // TODO(bunnei): This function exists to satisfy a hardware test with a Session object + // passed into WaitSynchronization. Not sure if it's possible for this to ever be false? + return MakeResult<bool>(true); + } }; } |