mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 19:35:28 +00:00
Message Queues, Threads, and surroundings cleanup (#1178)
* message queues, threads, and surroundings cleanup * Format, make the formatter prefer clang-format-11 if found * Fix __osThreadTail type * Q -> Queue, thread defines renamed * Reformat, add missing NULL * Suggested changes and further casting cleanup * Reformat * padmgr name fixes
This commit is contained in:
parent
9984c267d9
commit
7068ad3703
45 changed files with 311 additions and 296 deletions
|
@ -50,18 +50,18 @@ u32 sIrqMgrRetraceCount = 0;
|
|||
*
|
||||
* @param irqMgr the IrqMgr instance to register with.
|
||||
* @param client client to register.
|
||||
* @param msgQ message queue to send notifications of interrupts to, associated with the client.
|
||||
* @param msgQueue message queue to send notifications of interrupts to, associated with the client.
|
||||
*/
|
||||
void IrqMgr_AddClient(IrqMgr* irqMgr, IrqMgrClient* client, OSMesgQueue* msgQ) {
|
||||
void IrqMgr_AddClient(IrqMgr* irqMgr, IrqMgrClient* client, OSMesgQueue* msgQueue) {
|
||||
OSIntMask prevInt;
|
||||
|
||||
LogUtils_CheckNullPointer("this", irqMgr, "../irqmgr.c", 96);
|
||||
LogUtils_CheckNullPointer("c", client, "../irqmgr.c", 97);
|
||||
LogUtils_CheckNullPointer("msgQ", msgQ, "../irqmgr.c", 98);
|
||||
LogUtils_CheckNullPointer("msgQ", msgQueue, "../irqmgr.c", 98);
|
||||
|
||||
prevInt = osSetIntMask(OS_IM_NONE);
|
||||
|
||||
client->queue = msgQ;
|
||||
client->queue = msgQueue;
|
||||
client->prev = irqMgr->clients;
|
||||
irqMgr->clients = client;
|
||||
|
||||
|
@ -298,6 +298,6 @@ void IrqMgr_Init(IrqMgr* irqMgr, void* stack, OSPri pri, u8 retraceCount) {
|
|||
osCreateMesgQueue(&irqMgr->queue, irqMgr->msgBuf, ARRAY_COUNT(irqMgr->msgBuf));
|
||||
osSetEventMesg(OS_EVENT_PRENMI, &irqMgr->queue, (OSMesg)IRQ_PRENMI_MSG);
|
||||
osViSetEvent(&irqMgr->queue, (OSMesg)IRQ_RETRACE_MSG, retraceCount);
|
||||
osCreateThread(&irqMgr->thread, 19, IrqMgr_ThreadEntry, irqMgr, stack, pri);
|
||||
osCreateThread(&irqMgr->thread, THREAD_ID_IRQMGR, IrqMgr_ThreadEntry, irqMgr, stack, pri);
|
||||
osStartThread(&irqMgr->thread);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue