summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-05-17 19:47:44 +0200
committerbunnei <ericbunnie@gmail.com>2014-05-17 19:47:44 +0200
commitcfea5fdd5878968e8a1de99b86966c57d0fc5697 (patch)
treee05080cd53be04b42e97f5230f56169eaf6027f2 /src
parentMerge branch 'master' into threading (diff)
downloadyuzu-cfea5fdd5878968e8a1de99b86966c57d0fc5697.tar
yuzu-cfea5fdd5878968e8a1de99b86966c57d0fc5697.tar.gz
yuzu-cfea5fdd5878968e8a1de99b86966c57d0fc5697.tar.bz2
yuzu-cfea5fdd5878968e8a1de99b86966c57d0fc5697.tar.lz
yuzu-cfea5fdd5878968e8a1de99b86966c57d0fc5697.tar.xz
yuzu-cfea5fdd5878968e8a1de99b86966c57d0fc5697.tar.zst
yuzu-cfea5fdd5878968e8a1de99b86966c57d0fc5697.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/syscall.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/core/hle/syscall.cpp b/src/core/hle/syscall.cpp
index 0765bce7a..0c78b19fb 100644
--- a/src/core/hle/syscall.cpp
+++ b/src/core/hle/syscall.cpp
@@ -6,6 +6,9 @@
#include "core/mem_map.h"
+#include "core/hle/kernel/kernel.h"
+#include "core/hle/kernel/thread.h"
+
#include "core/hle/function_wrappers.h"
#include "core/hle/syscall.h"
#include "core/hle/service/service.h"
@@ -140,19 +143,23 @@ Result GetResourceLimitCurrentValues(void* _values, Handle resource_limit, void*
return 0;
}
-Result CreateThread(void* thread, u32 thread_priority, u32 entry_point, u32 arg, u32 stack_top, u32 processor_id) {
- std::string thread_name;
+Result CreateThread(void* thread, u32 priority, u32 entry_point, u32 arg, u32 stack_top,
+ u32 processor_id) {
+ std::string name;
if (Symbols::HasSymbol(entry_point)) {
TSymbol symbol = Symbols::GetSymbol(entry_point);
- thread_name = symbol.name;
+ name = symbol.name;
} else {
char buff[100];
- sprintf(buff, "%s", "unk-%08X", entry_point);
- thread_name = buff;
+ sprintf(buff, "%s", "unknown-%08X", entry_point);
+ name = buff;
}
- DEBUG_LOG(SVC, "(UNIMPLEMENTED) CreateThread called entrypoint=0x%08X (%s), arg=0x%08X, "
- "stacktop=0x%08X, threadpriority=0x%08X, processorid=0x%08X", entry_point,
- thread_name.c_str(), arg, stack_top, thread_priority, processor_id);
+ DEBUG_LOG(SVC, "CreateThread called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
+ "threadpriority=0x%08X, processorid=0x%08X", entry_point, name.c_str(), arg, stack_top,
+ priority, processor_id);
+
+ Handle handle = __KernelCreateThread(name.c_str(), entry_point, priority, processor_id,
+ stack_top);
return 0;
}