mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-18 20:57:46 -04:00
Update aurora & fixes for OS header changes
This commit is contained in:
@@ -23,16 +23,11 @@ void OSSetCurrentContext(OSContext* context) {
|
||||
}
|
||||
|
||||
void OSClearContext(OSContext* context) {
|
||||
if (!context) return;
|
||||
context->mode = 0;
|
||||
context->state = 0;
|
||||
// No-op on PC
|
||||
}
|
||||
|
||||
void OSInitContext(OSContext* context, u32 pc, u32 newsp) {
|
||||
if (!context) return;
|
||||
memset(context, 0, sizeof(OSContext));
|
||||
context->srr0 = pc;
|
||||
context->gpr[1] = newsp;
|
||||
// No-op on PC
|
||||
}
|
||||
|
||||
void OSDumpContext(OSContext* context) {
|
||||
|
||||
@@ -101,7 +101,7 @@ static thread_local OSThread* tls_currentThread = nullptr;
|
||||
|
||||
static OSThread sDefaultThread;
|
||||
static u8 sDefaultStack[64 * 1024];
|
||||
static u32 sDefaultStackEnd = OS_THREAD_STACK_MAGIC;
|
||||
static u8 sDefaultStackEnd = OS_THREAD_STACK_MAGIC;
|
||||
|
||||
// Global interrupt mutex (coarse-grained lock replacing interrupt disable)
|
||||
// Lazy-initialized to avoid DLL static init crashes
|
||||
@@ -237,7 +237,7 @@ int OSCreateThread(OSThread* thread, void* (*func)(void*), void* param,
|
||||
|
||||
// Stack (stack points to TOP on GameCube)
|
||||
thread->stackBase = (u8*)stack;
|
||||
thread->stackEnd = (u32*)((uintptr_t)stack - stackSize);
|
||||
thread->stackEnd = (u8*)((uintptr_t)stack - stackSize);
|
||||
*thread->stackEnd = OS_THREAD_STACK_MAGIC;
|
||||
|
||||
OSClearContext(&thread->context);
|
||||
@@ -496,7 +496,7 @@ void OSDetachThread(OSThread* thread) {
|
||||
OSWakeupThread(&thread->queueJoin);
|
||||
}
|
||||
|
||||
int OSJoinThread(OSThread* thread, void* val) {
|
||||
BOOL OSJoinThread(OSThread* thread, void** val) {
|
||||
if (!thread) return 0;
|
||||
|
||||
if (!(thread->attr & OS_THREAD_ATTR_DETACH)) {
|
||||
|
||||
+2
-2
@@ -94,7 +94,7 @@ static void ClearMsgQueueMap() {
|
||||
map.clear();
|
||||
}
|
||||
|
||||
void OSInitMessageQueue(OSMessageQueue* mq, void* msgArray, s32 msgCount) {
|
||||
void OSInitMessageQueue(OSMessageQueue* mq, OSMessage* msgArray, s32 msgCount) {
|
||||
if (!mq) return;
|
||||
mq->queueSend.head = mq->queueSend.tail = nullptr;
|
||||
mq->queueReceive.head = mq->queueReceive.tail = nullptr;
|
||||
@@ -128,7 +128,7 @@ int OSSendMessage(OSMessageQueue* mq, void* msg, s32 flags) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int OSReceiveMessage(OSMessageQueue* mq, void* msg, s32 flags) {
|
||||
BOOL OSReceiveMessage(OSMessageQueue* mq, OSMessage* msg, s32 flags) {
|
||||
if (!mq) return 0;
|
||||
|
||||
PCMessageQueueData& data = GetMsgQueueData(mq);
|
||||
|
||||
@@ -592,6 +592,7 @@ void myExceptionCallback(u16, OSContext*, u32, u32) {
|
||||
VIFlush();
|
||||
}
|
||||
|
||||
#ifndef TARGET_PC
|
||||
static void fault_callback_scroll(u16, OSContext* p_context, u32, u32) {
|
||||
JUTException* manager = JUTException::getManager();
|
||||
JUTConsole* exConsole = manager->getConsole();
|
||||
@@ -714,6 +715,7 @@ static void fault_callback_scroll(u16, OSContext* p_context, u32, u32) {
|
||||
} while (true);
|
||||
} while (true);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void dummy_string() {
|
||||
DEAD_STRING("\x1B[32m%-24s = size=%d KB\n\x1B[m");
|
||||
|
||||
Reference in New Issue
Block a user