Просмотр исходного кода

Move typedefs from kernel.h to more appropriate places

Yuri Kunde Schlesner 11 лет назад
Родитель
Сommit
c916bcf7b5
3 измененных файлов с 13 добавлено и 10 удалено
  1. 5 0
      src/common/common_types.h
  2. 7 0
      src/core/hle/hle.h
  3. 1 10
      src/core/hle/kernel/kernel.h

+ 5 - 0
src/common/common_types.h

@@ -47,6 +47,11 @@ typedef std::int64_t s64; ///< 64-bit signed int
 typedef float   f32; ///< 32-bit floating point
 typedef float   f32; ///< 32-bit floating point
 typedef double  f64; ///< 64-bit floating point
 typedef double  f64; ///< 64-bit floating point
 
 
+// TODO: It would be nice to eventually replace these with strong types that prevent accidental
+// conversion between each other.
+typedef u32 VAddr; ///< Represents a pointer in the userspace virtual address space.
+typedef u32 PAddr; ///< Represents a pointer in the ARM11 physical address space.
+
 /// Union for fast 16-bit type casting
 /// Union for fast 16-bit type casting
 union t16 {
 union t16 {
     u8  _u8[2];             ///< 8-bit unsigned char(s)
     u8  _u8[2];             ///< 8-bit unsigned char(s)

+ 7 - 0
src/core/hle/hle.h

@@ -4,6 +4,13 @@
 
 
 #pragma once
 #pragma once
 
 
+#include "common/common_types.h"
+
+typedef u32 Handle;
+typedef s32 Result;
+
+const Handle INVALID_HANDLE = 0;
+
 namespace HLE {
 namespace HLE {
 
 
 extern bool g_reschedule;   ///< If true, immediately reschedules the CPU to a new thread
 extern bool g_reschedule;   ///< If true, immediately reschedules the CPU to a new thread

+ 1 - 10
src/core/hle/kernel/kernel.h

@@ -11,18 +11,9 @@
 #include <vector>
 #include <vector>
 
 
 #include "common/common.h"
 #include "common/common.h"
+#include "core/hle/hle.h"
 #include "core/hle/result.h"
 #include "core/hle/result.h"
 
 
-typedef u32 Handle;
-typedef s32 Result;
-
-// TODO: It would be nice to eventually replace these with strong types that prevent accidental
-// conversion between each other.
-typedef u32 VAddr; ///< Represents a pointer in the userspace virtual address space.
-typedef u32 PAddr; ///< Represents a pointer in the ARM11 physical address space.
-
-const Handle INVALID_HANDLE = 0;
-
 namespace Kernel {
 namespace Kernel {
 
 
 class Thread;
 class Thread;