1
0
Fork 0
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:
Tharo 2022-04-09 01:20:23 +01:00 committed by GitHub
parent 9984c267d9
commit 7068ad3703
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 311 additions and 296 deletions

View file

@ -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);
}