2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

kernel: add a SyncRequest method to KernelObject for use with svcSendSyncRequest

This commit is contained in:
bunnei 2014-05-26 21:01:27 -04:00
parent 15d2ab1b33
commit d73d782ba7
4 changed files with 11 additions and 6 deletions

View file

@ -42,6 +42,7 @@ public:
virtual const char *GetTypeName() { return "[BAD KERNEL OBJECT TYPE]"; }
virtual const char *GetName() { return "[UNKNOWN KERNEL OBJECT]"; }
virtual Kernel::HandleType GetHandleType() const = 0;
virtual Result SyncRequest() = 0;
};
class ObjectPool : NonCopyable {

View file

@ -23,6 +23,11 @@ public:
bool locked; ///< Current locked state
Handle lock_thread; ///< Handle to thread that currently has mutex
std::vector<Handle> waiting_threads; ///< Threads that are waiting for the mutex
/// Synchronize kernel object
Result SyncRequest() {
return 0;
}
};
////////////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -36,6 +36,11 @@ public:
inline bool IsWaiting() const { return (status & THREADSTATUS_WAIT) != 0; }
inline bool IsSuspended() const { return (status & THREADSTATUS_SUSPEND) != 0; }
/// Synchronize kernel object
Result SyncRequest() {
return 0;
}
ThreadContext context;
u32 status;

View file

@ -26,12 +26,6 @@ public:
return "srv:";
}
/**
* Called when svcSendSyncRequest is called, loads command buffer and executes comand
* @return Return result of svcSendSyncRequest passed back to user app
*/
Result Sync();
};
} // namespace