mirror of
https://github.com/zeldaret/oot
synced 2026-05-23 23:05:31 -04:00
4639914583
* add some headers, split some of z64.h
* MtxClear -> IdentityMtx
* more misc cleanups
* move D_80116280 to header, fix build issue
* remove z64.h
* Revert "MtxClear -> IdentityMtx"
This reverts commit 8fc74c0672.
* split z64path.h and z64skin.h functions
* z64face_reaction.h
* cleanup overlay global references
* trim padding
* bss
29 lines
796 B
C
29 lines
796 B
C
#include "ultra64.h"
|
|
#include "sched.h"
|
|
|
|
/**
|
|
* Blocks the current thread until all queued scheduler tasks have completed.
|
|
*/
|
|
void Sched_FlushTaskQueue(void) {
|
|
OSScTask task;
|
|
OSMesgQueue queue;
|
|
OSMesg msg;
|
|
|
|
// Prepare a "NULL" task
|
|
task.next = NULL;
|
|
task.flags = OS_SC_NEEDS_RDP | OS_SC_NEEDS_RSP;
|
|
task.msgQueue = &queue;
|
|
task.msg = NULL;
|
|
task.framebuffer = NULL;
|
|
task.list.t.type = M_NULTASK;
|
|
osCreateMesgQueue(task.msgQueue, &msg, 1);
|
|
|
|
// Send it to and wake up the scheduler
|
|
osSendMesg(&gScheduler.cmdQueue, (OSMesg)&task, OS_MESG_BLOCK);
|
|
Sched_Notify(&gScheduler);
|
|
|
|
// Wait until the task has been processed, indicating that no task is
|
|
// running and the task queue is now empty.
|
|
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
|
|
}
|