Allow threads to gracefully shutdown

This commit is contained in:
Luke Street
2026-04-01 18:30:12 -06:00
parent 7d57ff914b
commit 2e920d510d
16 changed files with 135 additions and 158 deletions
+9
View File
@@ -94,7 +94,13 @@ void* JKRAram::run(void) {
OSInitMessageQueue(&sMessageQueue, sMessageBuffer, 4);
do {
OSMessage msg;
#ifdef TARGET_PC
if (!OSReceiveMessage(&sMessageQueue, &msg, OS_MESSAGE_BLOCK)) {
break;
}
#else
OSReceiveMessage(&sMessageQueue, &msg, OS_MESSAGE_BLOCK);
#endif
JKRAramCommand* message = (JKRAramCommand*)msg;
int result = message->field_0x00;
JKRAMCommand* command = (JKRAMCommand*)message->command;
@@ -106,6 +112,9 @@ void* JKRAram::run(void) {
break;
}
} while (true);
#ifdef TARGET_PC
return NULL;
#endif
}
void JKRAram::checkOkAddress(u8* addr, u32 size, JKRAramBlock* block, u32 param_4) {