diff options
| author | 2016-06-14 18:03:30 -0500 | |
|---|---|---|
| committer | 2016-11-30 23:02:05 -0500 | |
| commit | 073653e858abf377fd1ebbdb071809c8830ce99d (patch) | |
| tree | a29e1c1e50d53162ed89cd90e8c069525150392f /src/core/hle/kernel/kernel.h | |
| parent | Merge pull request #2228 from freiro/winver_fix (diff) | |
| download | yuzu-073653e858abf377fd1ebbdb071809c8830ce99d.tar.gz yuzu-073653e858abf377fd1ebbdb071809c8830ce99d.tar.xz yuzu-073653e858abf377fd1ebbdb071809c8830ce99d.zip | |
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.
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
| -rw-r--r-- | src/core/hle/kernel/kernel.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 231cf7b75..c11c14b7d 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h | |||
| @@ -31,22 +31,24 @@ enum KernelHandle : Handle { | |||
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | enum class HandleType : u32 { | 33 | enum class HandleType : u32 { |
| 34 | Unknown = 0, | 34 | Unknown = 0, |
| 35 | 35 | ||
| 36 | Session = 2, | 36 | |
| 37 | Event = 3, | 37 | Event = 3, |
| 38 | Mutex = 4, | 38 | Mutex = 4, |
| 39 | SharedMemory = 5, | 39 | SharedMemory = 5, |
| 40 | Redirection = 6, | 40 | Redirection = 6, |
| 41 | Thread = 7, | 41 | Thread = 7, |
| 42 | Process = 8, | 42 | Process = 8, |
| 43 | AddressArbiter = 9, | 43 | AddressArbiter = 9, |
| 44 | Semaphore = 10, | 44 | Semaphore = 10, |
| 45 | Timer = 11, | 45 | Timer = 11, |
| 46 | ResourceLimit = 12, | 46 | ResourceLimit = 12, |
| 47 | CodeSet = 13, | 47 | CodeSet = 13, |
| 48 | ClientPort = 14, | 48 | ClientPort = 14, |
| 49 | ServerPort = 15, | 49 | ServerPort = 15, |
| 50 | ClientSession = 16, | ||
| 51 | ServerSession = 17, | ||
| 50 | }; | 52 | }; |
| 51 | 53 | ||
| 52 | enum { | 54 | enum { |
| @@ -82,7 +84,7 @@ public: | |||
| 82 | */ | 84 | */ |
| 83 | bool IsWaitable() const { | 85 | bool IsWaitable() const { |
| 84 | switch (GetHandleType()) { | 86 | switch (GetHandleType()) { |
| 85 | case HandleType::Session: | 87 | case HandleType::ServerSession: |
| 86 | case HandleType::ServerPort: | 88 | case HandleType::ServerPort: |
| 87 | case HandleType::Event: | 89 | case HandleType::Event: |
| 88 | case HandleType::Mutex: | 90 | case HandleType::Mutex: |