mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Cleanup, fix RomFS reads (todo: revisit), add CFG::GetConfigInfoBlk2
This commit is contained in:
parent
1ddba7737f
commit
156a89ba75
7 changed files with 35 additions and 6 deletions
|
@ -11,6 +11,7 @@ void Kernel::switchThread(int newThreadIndex) {
|
|||
auto& oldThread = threads[currentThreadIndex];
|
||||
auto& newThread = threads[newThreadIndex];
|
||||
newThread.status = ThreadStatus::Running;
|
||||
printf("Switching from thread %d to %d\n", currentThreadIndex, newThreadIndex);
|
||||
|
||||
// Bail early if the new thread is actually the old thread
|
||||
if (currentThreadIndex == newThreadIndex) [[unlikely]] {
|
||||
|
@ -136,8 +137,8 @@ void Kernel::createThread() {
|
|||
u32 initialSP = regs[3] & ~7; // SP is force-aligned to 8 bytes
|
||||
s32 id = static_cast<s32>(regs[4]);
|
||||
|
||||
logSVC("CreateThread(entry = %08X, stacktop = %08X, priority = %X, processor ID = %d)\n", entrypoint,
|
||||
initialSP, priority, id);
|
||||
logSVC("CreateThread(entry = %08X, stacktop = %08X, arg = %X, priority = %X, processor ID = %d)\n", entrypoint,
|
||||
initialSP, arg, priority, id);
|
||||
|
||||
if (priority > 0x3F) [[unlikely]] {
|
||||
Helpers::panic("Created thread with bad priority value %X", priority);
|
||||
|
@ -157,7 +158,6 @@ void Kernel::sleepThreadOnArbiter(u32 waitingAddress) {
|
|||
switchToNextThread();
|
||||
}
|
||||
|
||||
|
||||
void Kernel::getThreadID() {
|
||||
Handle handle = regs[1];
|
||||
logSVC("GetThreadID(handle = %X)\n", handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue