1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>OS_SetThreadPriority</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_SetThreadPriority <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15 <PRE><CODE>#include <nitro/os.h></CODE></PRE> 16 <PRE><CODE>BOOL OS_SetThreadPriority( OSThread* thread, u32 prio ); 17 </CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1" width="100%"> 21 <TBODY> 22 <TR> 23 <TD width="13%"><EM><STRONG>thread</STRONG></EM></TD> 24 <TD width="87%">A pointer to the thread you want to prioritize.</TD> 25 </TR> 26 <TR> 27 <TD width="13%"><EM><STRONG>prio</STRONG></EM></TD> 28 <TD width="87%">The priority level you want to set (0-31).</TD> 29 </TR> 30 </TBODY> 31</TABLE> 32<H2>Return Values</H2> 33<P>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.</P> 34<H2>Description</H2> 35<P>This function sets thread priority.</P> 36<P>The thread priorities it can set (<B><I>priority</I></B>) 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.</P> 37<P>A thread can also specify itself in <B><I>thread</I></B>.</P> 38<P>The thread system creates an idle thread (priority 32) during <code><a href="OS_InitThread.html">OS_InitThread()</a></code>, but its priority cannot be changed.</P> 39<H2>See Also</H2> 40<P><code><a href="OS_InitThread.html">OS_InitThread</a>, <a href="OS_GetThreadPriority.html">OS_GetThreadPriority</a></code></P> 41<H2>Revision History</H2> 42<P>2004/04/27 Added note about idle thread. <BR>2004/02/26 Initial version.</P> 43<hr><p>CONFIDENTIAL</p></body> 44</HTML>