diff options
| author | 2014-05-15 18:25:56 -0400 | |
|---|---|---|
| committer | 2014-05-15 18:25:56 -0400 | |
| commit | 367d63691fe810c83979fee04b181338f96cfb50 (patch) | |
| tree | e27fc6a48b37bf94d3a805157d15d80d08f5e238 /src/core/hle/syscall.cpp | |
| parent | added ThreadQueueList class to common (taken from PPSSPP) (diff) | |
| download | yuzu-367d63691fe810c83979fee04b181338f96cfb50.tar.gz yuzu-367d63691fe810c83979fee04b181338f96cfb50.tar.xz yuzu-367d63691fe810c83979fee04b181338f96cfb50.zip | |
- added ThreadContext struct
- cleaned up CreateThread svc
Diffstat (limited to 'src/core/hle/syscall.cpp')
| -rw-r--r-- | src/core/hle/syscall.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core/hle/syscall.cpp b/src/core/hle/syscall.cpp index c697bc277..0700d9e82 100644 --- a/src/core/hle/syscall.cpp +++ b/src/core/hle/syscall.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "core/hle/function_wrappers.h" | 9 | #include "core/hle/function_wrappers.h" |
| 10 | #include "core/hle/syscall.h" | 10 | #include "core/hle/syscall.h" |
| 11 | #include "core/hle/service/service.h" | 11 | #include "core/hle/service/service.h" |
| 12 | #include "core/hle/kernel/thread.h" | ||
| 12 | 13 | ||
| 13 | #include "common/symbols.h" | 14 | #include "common/symbols.h" |
| 14 | 15 | ||
| @@ -139,16 +140,19 @@ Result GetResourceLimitCurrentValues(void* _values, Handle resource_limit, void* | |||
| 139 | return 0; | 140 | return 0; |
| 140 | } | 141 | } |
| 141 | 142 | ||
| 142 | Result CreateThread(void* thread, u32 threadpriority, u32 entrypoint, u32 arg, u32 stacktop, u32 processorid) { | 143 | Result CreateThread(void* thread, u32 thread_priority, u32 entry_point, u32 arg, u32 stack_top, u32 processor_id) { |
| 143 | std::string symbol_name = "unknown"; | 144 | std::string thread_name; |
| 144 | if (Symbols::HasSymbol(entrypoint)) { | 145 | if (Symbols::HasSymbol(entry_point)) { |
| 145 | TSymbol symbol = Symbols::GetSymbol(entrypoint); | 146 | TSymbol symbol = Symbols::GetSymbol(entry_point); |
| 146 | symbol_name = symbol.name; | 147 | thread_name = symbol.name; |
| 148 | } else { | ||
| 149 | char buff[100]; | ||
| 150 | sprintf(buff, "%s", "unk-%08X", entry_point); | ||
| 151 | thread_name = buff; | ||
| 147 | } | 152 | } |
| 148 | // stack top: 0x0056A4A0 | ||
| 149 | DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateThread called entrypoint=0x%08X (%s), arg=0x%08X, " | 153 | DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateThread called entrypoint=0x%08X (%s), arg=0x%08X, " |
| 150 | "stacktop=0x%08X, threadpriority=0x%08X, processorid=0x%08X", entrypoint, | 154 | "stacktop=0x%08X, threadpriority=0x%08X, processorid=0x%08X", entry_point, |
| 151 | symbol_name.c_str(), arg, stacktop, threadpriority, processorid); | 155 | thread_name.c_str(), arg, stack_top, thread_priority, processor_id); |
| 152 | 156 | ||
| 153 | return 0; | 157 | return 0; |
| 154 | } | 158 | } |