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

## osGetThreadPri
osSetThreadPri

Syntax

#include <ultra64.h>
void osGetThreadPri(OSThread *t);
void osSetThreadPri(OSThread *t, OSPri pri);
Explanation
The osGetThreadPri and osSetThreadPri functions obtain and reassign the priority of a thread.
The osGetThreadPri call returns the priority of the given thread specified by the t argument. If t is NULL, osGetThreadPri returns the priority of the invoking (currently running) thread.
The osSetThreadPri call sets the priority of thread specified by the t argument to the value specified by the pri argument. If t is NULL, then the priority of the current thread is set. As with osCreateThread, the priority value should range from OS_PRIORITY_IDLE (0) to OS_PRIORITY_APPMAX (127).
If t is runnable or blocked waiting to send or receive a message, it is a member of a priority-ordered queue. The osSetThreadPri call may cause the queue to be reordered to reflect the change in priority. In addition, if the thread becomes the highest priority runnable thread, the caller of osSetThreadPri immediately yields the CPU and the thread t will be allowed to run.
See Also
osCreateThread
osGetThreadId
osStartThread
osYieldThread

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