diff options
author | bunnei <bunneidev@gmail.com> | 2016-03-21 15:44:37 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-03-21 15:44:37 +0100 |
commit | 8986aa181d7dd85600e53fe33aa672c4d5619abd (patch) | |
tree | 95e0ac7e418472020d95f08c38adbc9b221f0d91 /src/core/hle/kernel | |
parent | Merge pull request #1302 from Subv/save_fix (diff) | |
parent | session: Make helper functions constexpr (diff) | |
download | yuzu-8986aa181d7dd85600e53fe33aa672c4d5619abd.tar yuzu-8986aa181d7dd85600e53fe33aa672c4d5619abd.tar.gz yuzu-8986aa181d7dd85600e53fe33aa672c4d5619abd.tar.bz2 yuzu-8986aa181d7dd85600e53fe33aa672c4d5619abd.tar.lz yuzu-8986aa181d7dd85600e53fe33aa672c4d5619abd.tar.xz yuzu-8986aa181d7dd85600e53fe33aa672c4d5619abd.tar.zst yuzu-8986aa181d7dd85600e53fe33aa672c4d5619abd.zip |
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/session.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/session.h b/src/core/hle/kernel/session.h index adaffcafe..6ddaf970e 100644 --- a/src/core/hle/kernel/session.h +++ b/src/core/hle/kernel/session.h @@ -16,23 +16,23 @@ namespace IPC { -inline u32 MakeHeader(u16 command_id, unsigned int regular_params, unsigned int translate_params) { +constexpr u32 MakeHeader(u16 command_id, unsigned int regular_params, unsigned int translate_params) { return ((u32)command_id << 16) | (((u32)regular_params & 0x3F) << 6) | (((u32)translate_params & 0x3F) << 0); } -inline u32 MoveHandleDesc(unsigned int num_handles = 1) { +constexpr u32 MoveHandleDesc(unsigned int num_handles = 1) { return 0x0 | ((num_handles - 1) << 26); } -inline u32 CopyHandleDesc(unsigned int num_handles = 1) { +constexpr u32 CopyHandleDesc(unsigned int num_handles = 1) { return 0x10 | ((num_handles - 1) << 26); } -inline u32 CallingPidDesc() { +constexpr u32 CallingPidDesc() { return 0x20; } -inline u32 StaticBufferDesc(u32 size, unsigned int buffer_id) { +constexpr u32 StaticBufferDesc(u32 size, unsigned int buffer_id) { return 0x2 | (size << 14) | ((buffer_id & 0xF) << 10); } @@ -42,7 +42,7 @@ enum MappedBufferPermissions { RW = R | W, }; -inline u32 MappedBufferDesc(u32 size, MappedBufferPermissions perms) { +constexpr u32 MappedBufferDesc(u32 size, MappedBufferPermissions perms) { return 0x8 | (size << 4) | (u32)perms; } |