osScGetTaskQ osScGetTaskQ (function)

Gets the message queue used for communicating with the scheduler thread

Syntax

#include <ultra64.h>     /* ultra64.h */
OSMesgQueue *osScGetCmdQ(OSSched *s);

Arguments

s
the pointer to the scheduler structure

Description

To send tasks to the Scheduler on the task queue for execution, you must first create and initialize an OSScTask structure, which has the following fields:

next
Not used by the client. (It is used by the scheduler for list management.)

state
Not used by the client. (It is used by the scheduler for state management.)

framebuffer
Address of the frame buffer for this task if it is a graphics task.

list
Structure containing task code and command list data. (See osSpTaskLoad for more information.)

msgQ
The message queue on which the client is to receive the "task done" message.

msg
The message that the client is to receive when the task is finished.

Once you have created and initialized an OSScTask structure, you can send it to the Scheduler thread by way of the Scheduler's task queue. To obtain a pointer to this queue, call osScGetTaskQ. The Scheduler will read this task queue after the next retrace message from the Vi Manager. Usually, you will send one audio and one graphics task to the Scheduler each frame. After you send the task to the Scheduler, you should not modify it until you receive the "done" message (the message that the client is to receive when the task in finished).

See Also

osSpTaskLoad, osCreateScheduler, and osScAddClient

Revision History

1999/04/30 Changed format