diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-16 00:25:56 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-16 00:25:56 +0200 |
commit | 367d63691fe810c83979fee04b181338f96cfb50 (patch) | |
tree | e27fc6a48b37bf94d3a805157d15d80d08f5e238 /src | |
parent | added ThreadQueueList class to common (taken from PPSSPP) (diff) | |
download | yuzu-367d63691fe810c83979fee04b181338f96cfb50.tar yuzu-367d63691fe810c83979fee04b181338f96cfb50.tar.gz yuzu-367d63691fe810c83979fee04b181338f96cfb50.tar.bz2 yuzu-367d63691fe810c83979fee04b181338f96cfb50.tar.lz yuzu-367d63691fe810c83979fee04b181338f96cfb50.tar.xz yuzu-367d63691fe810c83979fee04b181338f96cfb50.tar.zst yuzu-367d63691fe810c83979fee04b181338f96cfb50.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/syscall.cpp | 20 | ||||
-rw-r--r-- | src/core/hle/syscall.h | 14 |
2 files changed, 26 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 @@ #include "core/hle/function_wrappers.h" #include "core/hle/syscall.h" #include "core/hle/service/service.h" +#include "core/hle/kernel/thread.h" #include "common/symbols.h" @@ -139,16 +140,19 @@ Result GetResourceLimitCurrentValues(void* _values, Handle resource_limit, void* return 0; } -Result CreateThread(void* thread, u32 threadpriority, u32 entrypoint, u32 arg, u32 stacktop, u32 processorid) { - std::string symbol_name = "unknown"; - if (Symbols::HasSymbol(entrypoint)) { - TSymbol symbol = Symbols::GetSymbol(entrypoint); - symbol_name = symbol.name; +Result CreateThread(void* thread, u32 thread_priority, u32 entry_point, u32 arg, u32 stack_top, u32 processor_id) { + std::string thread_name; + if (Symbols::HasSymbol(entry_point)) { + TSymbol symbol = Symbols::GetSymbol(entry_point); + thread_name = symbol.name; + } else { + char buff[100]; + sprintf(buff, "%s", "unk-%08X", entry_point); + thread_name = buff; } - // stack top: 0x0056A4A0 DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateThread called entrypoint=0x%08X (%s), arg=0x%08X, " - "stacktop=0x%08X, threadpriority=0x%08X, processorid=0x%08X", entrypoint, - symbol_name.c_str(), arg, stacktop, threadpriority, processorid); + "stacktop=0x%08X, threadpriority=0x%08X, processorid=0x%08X", entry_point, + thread_name.c_str(), arg, stack_top, thread_priority, processor_id); return 0; } diff --git a/src/core/hle/syscall.h b/src/core/hle/syscall.h index 7a94e0136..15af5e138 100644 --- a/src/core/hle/syscall.h +++ b/src/core/hle/syscall.h @@ -7,6 +7,20 @@ #include "common/common_types.h" //////////////////////////////////////////////////////////////////////////////////////////////////// +// SVC structures + +struct ThreadContext { + u32 cpu_registers[13]; + u32 sp; + u32 lr; + u32 pc; + u32 cpsr; + u32 fpu_registers[32]; + u32 fpscr; + u32 fpexc; +}; + +//////////////////////////////////////////////////////////////////////////////////////////////////// // Namespace Syscall namespace Syscall { |