summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2015-01-18 20:40:53 -0500
committerGravatar bunnei2015-01-21 20:47:47 -0500
commit9e6ec3b6cd23a7cef80a1d62fda515018f080083 (patch)
treee1657378ee0bce660d4c5a53f8d4a4ebc35d6d67 /src/core
parentKernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs. (diff)
downloadyuzu-9e6ec3b6cd23a7cef80a1d62fda515018f080083.tar.gz
yuzu-9e6ec3b6cd23a7cef80a1d62fda515018f080083.tar.xz
yuzu-9e6ec3b6cd23a7cef80a1d62fda515018f080083.zip
Session: Change to a WaitObject.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/kernel.cpp2
-rw-r--r--src/core/hle/kernel/kernel.h1
-rw-r--r--src/core/hle/kernel/session.h8
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() {
39 39
40 next_thread->ReleaseWaitObject(this); 40 next_thread->ReleaseWaitObject(this);
41 41
42 return next_thread.get(); 42 return next_thread;
43} 43}
44 44
45void WaitObject::WakeupAllWaitingThreads() { 45void 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:
71 */ 71 */
72 bool IsWaitable() const { 72 bool IsWaitable() const {
73 switch (GetHandleType()) { 73 switch (GetHandleType()) {
74 case HandleType::Session:
74 case HandleType::Event: 75 case HandleType::Event:
75 case HandleType::Mutex: 76 case HandleType::Mutex:
76 case HandleType::Thread: 77 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) {
41 * CTR-OS so that IPC calls can be optionally handled by the real implementations of processes, as 41 * CTR-OS so that IPC calls can be optionally handled by the real implementations of processes, as
42 * opposed to HLE simulations. 42 * opposed to HLE simulations.
43 */ 43 */
44class Session : public Object { 44class Session : public WaitObject {
45public: 45public:
46 std::string GetTypeName() const override { return "Session"; } 46 std::string GetTypeName() const override { return "Session"; }
47 47
@@ -53,6 +53,12 @@ public:
53 * aren't supported yet. 53 * aren't supported yet.
54 */ 54 */
55 virtual ResultVal<bool> SyncRequest() = 0; 55 virtual ResultVal<bool> SyncRequest() = 0;
56
57 ResultVal<bool> Wait() override {
58 // TODO(bunnei): This function exists to satisfy a hardware test with a Session object
59 // passed into WaitSynchronization. Not sure if it's possible for this to ever be false?
60 return MakeResult<bool>(true);
61 }
56}; 62};
57 63
58} 64}