summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2014-12-22 04:30:09 -0200
committerGravatar Yuri Kunde Schlesner2015-01-09 03:51:55 -0200
commit7b3452c7303cf348377de6702ddda0307533663c (patch)
treece08ed7d7c42015919e1dd26cb2ec8721a54ec8a /src/core/hle/kernel/thread.cpp
parentMerge pull request #255 from Subv/cbranch_3 (diff)
downloadyuzu-7b3452c7303cf348377de6702ddda0307533663c.tar.gz
yuzu-7b3452c7303cf348377de6702ddda0307533663c.tar.xz
yuzu-7b3452c7303cf348377de6702ddda0307533663c.zip
Move ThreadContext to core/core.h and deal with the fallout
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 954bd09a0..3e9ea464d 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -10,6 +10,7 @@
10#include "common/common.h" 10#include "common/common.h"
11#include "common/thread_queue_list.h" 11#include "common/thread_queue_list.h"
12 12
13#include "core/arm/arm_interface.h"
13#include "core/core.h" 14#include "core/core.h"
14#include "core/core_timing.h" 15#include "core/core_timing.h"
15#include "core/hle/hle.h" 16#include "core/hle/hle.h"
@@ -50,7 +51,7 @@ public:
50 return MakeResult<bool>(wait); 51 return MakeResult<bool>(wait);
51 } 52 }
52 53
53 ThreadContext context; 54 Core::ThreadContext context;
54 55
55 u32 thread_id; 56 u32 thread_id;
56 57
@@ -104,18 +105,18 @@ inline void SetCurrentThread(Thread* t) {
104} 105}
105 106
106/// Saves the current CPU context 107/// Saves the current CPU context
107void SaveContext(ThreadContext& ctx) { 108void SaveContext(Core::ThreadContext& ctx) {
108 Core::g_app_core->SaveContext(ctx); 109 Core::g_app_core->SaveContext(ctx);
109} 110}
110 111
111/// Loads a CPU context 112/// Loads a CPU context
112void LoadContext(ThreadContext& ctx) { 113void LoadContext(Core::ThreadContext& ctx) {
113 Core::g_app_core->LoadContext(ctx); 114 Core::g_app_core->LoadContext(ctx);
114} 115}
115 116
116/// Resets a thread 117/// Resets a thread
117void ResetThread(Thread* t, u32 arg, s32 lowest_priority) { 118void ResetThread(Thread* t, u32 arg, s32 lowest_priority) {
118 memset(&t->context, 0, sizeof(ThreadContext)); 119 memset(&t->context, 0, sizeof(Core::ThreadContext));
119 120
120 t->context.cpu_registers[0] = arg; 121 t->context.cpu_registers[0] = arg;
121 t->context.pc = t->context.reg_15 = t->entry_point; 122 t->context.pc = t->context.reg_15 = t->entry_point;