diff options
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/service/cfg/cfg_s.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/svc.cpp | 7 | ||||
-rw-r--r-- | src/core/hle/svc.h | 2 |
4 files changed, 15 insertions, 6 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 64166ab9..8b49fc7d 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -217,6 +217,14 @@ static void SwitchContext(Thread* new_thread) { new_thread->context.pc -= thumb_mode ? 2 : 4; } + // Clean up the thread's wait_objects, they'll be restored if needed during + // the svcWaitSynchronization call + for (int i = 0; i < new_thread->wait_objects.size(); ++i) { + SharedPtr<WaitObject> object = new_thread->wait_objects[i]; + object->RemoveWaitingThread(new_thread); + } + new_thread->wait_objects.clear(); + ready_queue.remove(new_thread->current_priority, new_thread); new_thread->status = THREADSTATUS_RUNNING; diff --git a/src/core/hle/service/cfg/cfg_s.cpp b/src/core/hle/service/cfg/cfg_s.cpp index af4adba8..a329514a 100644 --- a/src/core/hle/service/cfg/cfg_s.cpp +++ b/src/core/hle/service/cfg/cfg_s.cpp @@ -11,7 +11,9 @@ namespace CFG { const Interface::FunctionInfo FunctionTable[] = { {0x00010082, GetConfigInfoBlk2, "GetConfigInfoBlk2"}, - {0x00020000, nullptr, "SecureInfoGetRegion"}, + {0x00020000, SecureInfoGetRegion, "SecureInfoGetRegion"}, + {0x00030040, GenHashConsoleUnique, "GenHashConsoleUnique"}, + {0x00050000, GetSystemModel, "GetSystemModel"}, {0x04010082, GetConfigInfoBlk8, "GetConfigInfoBlk8"}, {0x04020082, nullptr, "SetConfigInfoBlk4"}, {0x04030000, UpdateConfigNANDSavegame, "UpdateConfigNANDSavegame"}, diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 802ecc52..bdede964 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -833,8 +833,7 @@ static const FunctionDef SVC_Table[] = { Common::Profiling::TimingCategory profiler_svc("SVC Calls"); -static const FunctionDef* GetSVCInfo(u32 opcode) { - u32 func_num = opcode & 0xFFFFFF; // 8 bits +static const FunctionDef* GetSVCInfo(u32 func_num) { if (func_num >= ARRAY_SIZE(SVC_Table)) { LOG_ERROR(Kernel_SVC, "unknown svc=0x%02X", func_num); return nullptr; @@ -842,10 +841,10 @@ static const FunctionDef* GetSVCInfo(u32 opcode) { return &SVC_Table[func_num]; } -void CallSVC(u32 opcode) { +void CallSVC(u32 immediate) { Common::Profiling::ScopeTimer timer_svc(profiler_svc); - const FunctionDef *info = GetSVCInfo(opcode); + const FunctionDef* info = GetSVCInfo(immediate); if (info) { if (info->func) { info->func(); diff --git a/src/core/hle/svc.h b/src/core/hle/svc.h index 4389aa73..12de9ffb 100644 --- a/src/core/hle/svc.h +++ b/src/core/hle/svc.h @@ -41,6 +41,6 @@ enum ArbitrationType { namespace SVC { -void CallSVC(u32 opcode); +void CallSVC(u32 immediate); } // namespace |