Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions. Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed. HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately.
This commit is contained in:
parent
68c00ee771
commit
073653e858
16 changed files with 315 additions and 89 deletions
|
@ -31,22 +31,24 @@ enum KernelHandle : Handle {
|
|||
};
|
||||
|
||||
enum class HandleType : u32 {
|
||||
Unknown = 0,
|
||||
Unknown = 0,
|
||||
|
||||
Session = 2,
|
||||
Event = 3,
|
||||
Mutex = 4,
|
||||
SharedMemory = 5,
|
||||
Redirection = 6,
|
||||
Thread = 7,
|
||||
Process = 8,
|
||||
AddressArbiter = 9,
|
||||
Semaphore = 10,
|
||||
Timer = 11,
|
||||
ResourceLimit = 12,
|
||||
CodeSet = 13,
|
||||
ClientPort = 14,
|
||||
ServerPort = 15,
|
||||
|
||||
Event = 3,
|
||||
Mutex = 4,
|
||||
SharedMemory = 5,
|
||||
Redirection = 6,
|
||||
Thread = 7,
|
||||
Process = 8,
|
||||
AddressArbiter = 9,
|
||||
Semaphore = 10,
|
||||
Timer = 11,
|
||||
ResourceLimit = 12,
|
||||
CodeSet = 13,
|
||||
ClientPort = 14,
|
||||
ServerPort = 15,
|
||||
ClientSession = 16,
|
||||
ServerSession = 17,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -82,7 +84,7 @@ public:
|
|||
*/
|
||||
bool IsWaitable() const {
|
||||
switch (GetHandleType()) {
|
||||
case HandleType::Session:
|
||||
case HandleType::ServerSession:
|
||||
case HandleType::ServerPort:
|
||||
case HandleType::Event:
|
||||
case HandleType::Mutex:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue