diff options
| author | 2014-05-20 23:36:35 -0400 | |
|---|---|---|
| committer | 2014-05-20 23:36:35 -0400 | |
| commit | 706584f007f48cd319fe7511969f914843951088 (patch) | |
| tree | aead6b823bfe74de7e4423b217eba963667e44a2 /src/core/hle/svc.cpp | |
| parent | mutex: refactored the interface to code to return a Mutex* handle (diff) | |
| download | yuzu-706584f007f48cd319fe7511969f914843951088.tar.gz yuzu-706584f007f48cd319fe7511969f914843951088.tar.xz yuzu-706584f007f48cd319fe7511969f914843951088.zip | |
svc: enabled use of newly created kernel thread handle
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index ffacdfb86..6f6f5b2f5 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -162,8 +162,7 @@ Result GetResourceLimitCurrentValues(void* _values, Handle resource_limit, void* | |||
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | /// Creates a new thread | 164 | /// Creates a new thread |
| 165 | Result CreateThread(void* thread, u32 priority, u32 entry_point, u32 arg, u32 stack_top, | 165 | Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top, u32 processor_id) { |
| 166 | u32 processor_id) { | ||
| 167 | std::string name; | 166 | std::string name; |
| 168 | if (Symbols::HasSymbol(entry_point)) { | 167 | if (Symbols::HasSymbol(entry_point)) { |
| 169 | TSymbol symbol = Symbols::GetSymbol(entry_point); | 168 | TSymbol symbol = Symbols::GetSymbol(entry_point); |
| @@ -177,9 +176,10 @@ Result CreateThread(void* thread, u32 priority, u32 entry_point, u32 arg, u32 st | |||
| 177 | "threadpriority=0x%08X, processorid=0x%08X", entry_point, name.c_str(), arg, stack_top, | 176 | "threadpriority=0x%08X, processorid=0x%08X", entry_point, name.c_str(), arg, stack_top, |
| 178 | priority, processor_id); | 177 | priority, processor_id); |
| 179 | 178 | ||
| 180 | Handle handle = Kernel::CreateThread(name.c_str(), entry_point, priority, processor_id, | 179 | Handle thread = Kernel::CreateThread(name.c_str(), entry_point, priority, processor_id, |
| 181 | stack_top); | 180 | stack_top); |
| 182 | Core::g_app_core->SetReg(1, 0xFEEDDEAF); | 181 | |
| 182 | Core::g_app_core->SetReg(1, thread); | ||
| 183 | 183 | ||
| 184 | return 0; | 184 | return 0; |
| 185 | } | 185 | } |
| @@ -231,7 +231,7 @@ const HLE::FunctionDef SVC_Table[] = { | |||
| 231 | {0x05, NULL, "SetProcessAffinityMask"}, | 231 | {0x05, NULL, "SetProcessAffinityMask"}, |
| 232 | {0x06, NULL, "GetProcessIdealProcessor"}, | 232 | {0x06, NULL, "GetProcessIdealProcessor"}, |
| 233 | {0x07, NULL, "SetProcessIdealProcessor"}, | 233 | {0x07, NULL, "SetProcessIdealProcessor"}, |
| 234 | {0x08, WrapI_VUUUUU<CreateThread>, "CreateThread"}, | 234 | {0x08, WrapI_UUUUU<CreateThread>, "CreateThread"}, |
| 235 | {0x09, NULL, "ExitThread"}, | 235 | {0x09, NULL, "ExitThread"}, |
| 236 | {0x0A, NULL, "SleepThread"}, | 236 | {0x0A, NULL, "SleepThread"}, |
| 237 | {0x0B, NULL, "GetThreadPriority"}, | 237 | {0x0B, NULL, "GetThreadPriority"}, |