N64® Functions Menu

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

Nintendo® Confidential

## osScGetTaskQ

Syntax

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

- s is the pointer to the scheduler structure

Explanation
It gets the message queue used for communicating with the scheduler thread.
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 receives when the task in finished).
See Also
osSpTaskLoad
osCreateScheduler
osScAddClient

Nintendo® Confidential Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1998