Merge pull request #360 from wheremyfoodat/helpme
Implement SVC 0x3B (GetThreadContext)
This commit is contained in:
@@ -146,6 +146,7 @@ public:
|
||||
void getResourceLimitCurrentValues();
|
||||
void getSystemInfo();
|
||||
void getSystemTick();
|
||||
void getThreadContext();
|
||||
void getThreadID();
|
||||
void getThreadIdealProcessor();
|
||||
void getThreadPriority();
|
||||
|
||||
@@ -66,6 +66,7 @@ void Kernel::serviceSVC(u32 svc) {
|
||||
case 0x38: getResourceLimit(); break;
|
||||
case 0x39: getResourceLimitLimitValues(); break;
|
||||
case 0x3A: getResourceLimitCurrentValues(); break;
|
||||
case 0x3B: getThreadContext(); break;
|
||||
case 0x3D: outputDebugString(); break;
|
||||
default: Helpers::panic("Unimplemented svc: %X @ %08X", svc, regs[15]); break;
|
||||
}
|
||||
|
||||
@@ -462,6 +462,13 @@ void Kernel::getThreadIdealProcessor() {
|
||||
regs[1] = static_cast<u32>(ProcessorID::AppCore);
|
||||
}
|
||||
|
||||
void Kernel::getThreadContext() {
|
||||
Helpers::warn("Stubbed Kernel::GetThreadContext");
|
||||
|
||||
// TODO: Decompile this from Kernel11. 3DBrew says function is stubbed.
|
||||
regs[0] = Result::Success;
|
||||
}
|
||||
|
||||
void Kernel::setThreadPriority() {
|
||||
const Handle handle = regs[0];
|
||||
const u32 priority = regs[1];
|
||||
|
||||
Reference in New Issue
Block a user