diff options
| -rw-r--r-- | src/common/common_types.h | 5 | ||||
| -rw-r--r-- | src/core/hle/hle.h | 7 | ||||
| -rw-r--r-- | src/core/hle/kernel/kernel.h | 11 |
3 files changed, 13 insertions, 10 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h index 5c004c5fa..644709ba6 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h | |||
| @@ -47,6 +47,11 @@ typedef std::int64_t s64; ///< 64-bit signed int | |||
| 47 | typedef float f32; ///< 32-bit floating point | 47 | typedef float f32; ///< 32-bit floating point |
| 48 | typedef double f64; ///< 64-bit floating point | 48 | typedef double f64; ///< 64-bit floating point |
| 49 | 49 | ||
| 50 | // TODO: It would be nice to eventually replace these with strong types that prevent accidental | ||
| 51 | // conversion between each other. | ||
| 52 | typedef u32 VAddr; ///< Represents a pointer in the userspace virtual address space. | ||
| 53 | typedef u32 PAddr; ///< Represents a pointer in the ARM11 physical address space. | ||
| 54 | |||
| 50 | /// Union for fast 16-bit type casting | 55 | /// Union for fast 16-bit type casting |
| 51 | union t16 { | 56 | union t16 { |
| 52 | u8 _u8[2]; ///< 8-bit unsigned char(s) | 57 | u8 _u8[2]; ///< 8-bit unsigned char(s) |
diff --git a/src/core/hle/hle.h b/src/core/hle/hle.h index 23de1aab7..e0b97797c 100644 --- a/src/core/hle/hle.h +++ b/src/core/hle/hle.h | |||
| @@ -4,6 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | ||
| 8 | |||
| 9 | typedef u32 Handle; | ||
| 10 | typedef s32 Result; | ||
| 11 | |||
| 12 | const Handle INVALID_HANDLE = 0; | ||
| 13 | |||
| 7 | namespace HLE { | 14 | namespace HLE { |
| 8 | 15 | ||
| 9 | extern bool g_reschedule; ///< If true, immediately reschedules the CPU to a new thread | 16 | extern bool g_reschedule; ///< If true, immediately reschedules the CPU to a new thread |
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index ab06fa025..80a09cadc 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h | |||
| @@ -11,18 +11,9 @@ | |||
| 11 | #include <vector> | 11 | #include <vector> |
| 12 | 12 | ||
| 13 | #include "common/common.h" | 13 | #include "common/common.h" |
| 14 | #include "core/hle/hle.h" | ||
| 14 | #include "core/hle/result.h" | 15 | #include "core/hle/result.h" |
| 15 | 16 | ||
| 16 | typedef u32 Handle; | ||
| 17 | typedef s32 Result; | ||
| 18 | |||
| 19 | // TODO: It would be nice to eventually replace these with strong types that prevent accidental | ||
| 20 | // conversion between each other. | ||
| 21 | typedef u32 VAddr; ///< Represents a pointer in the userspace virtual address space. | ||
| 22 | typedef u32 PAddr; ///< Represents a pointer in the ARM11 physical address space. | ||
| 23 | |||
| 24 | const Handle INVALID_HANDLE = 0; | ||
| 25 | |||
| 26 | namespace Kernel { | 17 | namespace Kernel { |
| 27 | 18 | ||
| 28 | class Thread; | 19 | class Thread; |