summaryrefslogtreecommitdiff
path: root/src/core/hle/ipc.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-15 22:30:21 -0700
committerGitHub <noreply@github.com>2021-05-15 22:30:21 -0700
commit5a2b15bf75318987d773a2bc69bd6224a28b7939 (patch)
treef213f5b011410022e8e98f7c3905d16d575ed413 /src/core/hle/ipc.h
parenta1138028a82d61f2cad2305686bf720966fabef9 (diff)
parenteee302b9b9feb325d5444eace51266d238b8e0b3 (diff)
Merge pull request #6299 from bunnei/ipc-improvements
Various improvements to IPC and session management
Diffstat (limited to 'src/core/hle/ipc.h')
-rw-r--r--src/core/hle/ipc.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/hle/ipc.h b/src/core/hle/ipc.h
index 55b1716e4..602e12606 100644
--- a/src/core/hle/ipc.h
+++ b/src/core/hle/ipc.h
@@ -32,7 +32,8 @@ enum class CommandType : u32 {
Control = 5,
RequestWithContext = 6,
ControlWithContext = 7,
- Unspecified,
+ TIPC_Close = 15,
+ TIPC_CommandRegion = 16, // Start of TIPC commands, this is an offset.
};
struct CommandHeader {
@@ -57,6 +58,20 @@ struct CommandHeader {
BitField<10, 4, BufferDescriptorCFlag> buf_c_descriptor_flags;
BitField<31, 1, u32> enable_handle_descriptor;
};
+
+ bool IsTipc() const {
+ return type.Value() >= CommandType::TIPC_CommandRegion;
+ }
+
+ bool IsCloseCommand() const {
+ switch (type.Value()) {
+ case CommandType::Close:
+ case CommandType::TIPC_Close:
+ return true;
+ default:
+ return false;
+ }
+ }
};
static_assert(sizeof(CommandHeader) == 8, "CommandHeader size is incorrect");