Session: Change to a WaitObject.
This commit is contained in:
parent
d2759c578e
commit
9e6ec3b6cd
|
@ -39,7 +39,7 @@ Thread* WaitObject::ReleaseNextThread() {
|
||||||
|
|
||||||
next_thread->ReleaseWaitObject(this);
|
next_thread->ReleaseWaitObject(this);
|
||||||
|
|
||||||
return next_thread.get();
|
return next_thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaitObject::WakeupAllWaitingThreads() {
|
void WaitObject::WakeupAllWaitingThreads() {
|
||||||
|
|
|
@ -71,6 +71,7 @@ public:
|
||||||
*/
|
*/
|
||||||
bool IsWaitable() const {
|
bool IsWaitable() const {
|
||||||
switch (GetHandleType()) {
|
switch (GetHandleType()) {
|
||||||
|
case HandleType::Session:
|
||||||
case HandleType::Event:
|
case HandleType::Event:
|
||||||
case HandleType::Mutex:
|
case HandleType::Mutex:
|
||||||
case HandleType::Thread:
|
case HandleType::Thread:
|
||||||
|
|
|
@ -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
|
* CTR-OS so that IPC calls can be optionally handled by the real implementations of processes, as
|
||||||
* opposed to HLE simulations.
|
* opposed to HLE simulations.
|
||||||
*/
|
*/
|
||||||
class Session : public Object {
|
class Session : public WaitObject {
|
||||||
public:
|
public:
|
||||||
std::string GetTypeName() const override { return "Session"; }
|
std::string GetTypeName() const override { return "Session"; }
|
||||||
|
|
||||||
|
@ -53,6 +53,12 @@ public:
|
||||||
* aren't supported yet.
|
* aren't supported yet.
|
||||||
*/
|
*/
|
||||||
virtual ResultVal<bool> SyncRequest() = 0;
|
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);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue