al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
osCreateSchedulerSyntax#include <ultra64.h> void osCreateScheduler(OSSched *s, void *stack, OSPri priority, u8 mode, u8 retraceCount); Arguments
It creates an RCP task scheduler. The Scheduler is a host CPU thread that is responsible for executing audio and graphics tasks on the RCP such that host and RCP overrun is minimized or eliminated. Each video retrace, the Scheduler reads the new tasks generated by the scheduler client threads from the task queue and adds them to the end of a real-time (audio) or non-real-time (graphics) task schedule list. If the previous frame's graphics task has overrun, the Scheduler causes the task to yield. It then runs the next audio task, resuming the yielded task when the audio task has completely processed. Then it runs any additional graphics tasks that are to be run in the current frame. When a task completes, the Scheduler sends a message to the client indicating that the work it requested is complete. Before using the Scheduler, you must first call osCreateScheduler to initialize the OSSched data structure along with its message queues and the VI Manager. The osCreateScheduler function spawns a thread to schedule and manage task execution. One of its arguments is the thread priority, which should be higher than that of the threads that generate the command lists. See Also osScAddClient osScGetTaskQ osCreateScheduler
|