OS_SetThreadPriority

Syntax

#include <nitro/os.h>
BOOL OS_SetThreadPriority( OSThread* thread, u32 prio );
  

Arguments

thread A pointer to the thread you want to prioritize.
prio The priority level you want to set (0-31).

Return Values

Returns TRUE if priority setting succeeded. Returns TRUE even if you set to the same priority as the original. Returns FALSE if there is no thread.

Description

This function sets thread priority.

The thread priorities it can set (priority) range from 0 to 31. Threads that have a priority level of 0 have the highest priority. If thread priorities change, scheduling might also change.

A thread can also specify itself in thread.

The thread system creates an idle thread (priority 32) during OS_InitThread(), but its priority cannot be changed.

See Also

OS_InitThread, OS_GetThreadPriority

Revision History

2004/04/27 Added note about idle thread.
2004/02/26 Initial version.


CONFIDENTIAL