1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>OSSetThreadSpecific</title> 10</head> 11 12<body> 13 14<h1>OSGetThreadSpecific/OSSetThreadSpecific</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/os.h> 19 20#define OS_THREAD_SPECIFIC_MAX 2 21 22void* OSGetThreadSpecific ( s32 index ); 23void OSSetThreadSpecific ( s32 index, void* ptr ); 24</pre></dd></dl> 25 26<h2>Arguments</h2> 27<TABLE class="arguments" border="1" > 28 <tr> 29<TH>index</TH> 30<TD>Index to the thread-specific data (zero or one).</TD> 31 </tr> 32 <tr> 33<TH>ptr</TH> 34<TD>The thread specific data to set (<code>OSSetThreadSpecific</code>)</TD> 35 </tr> 36</TABLE> 37 38<h2>Return Values</h2> 39<P>The <code>OSGetThreadSpecific</code> function returns the thread-specific data at <SPAN class="argument">index</SPAN>. The <code>OSSetThreadSpecific</code> function does not have a return value.</P> 40 41<h2>Description</h2> 42<P>Gets/sets data specific to the thread that called this function. Each thread can store up to <code>OS_THREAD_SPECIFIC_MAX</code> void pointers in the <code>OSThread</code> structure. When threads are created, thread-specific data is cleared to zero.</P> 43 44<h2>See Also</h2> 45<P class="reference"> 46<a href="../toc.html#Thread" target="contents">Thread Functions</a>, 47<a href="../toc.html#ThreadSynchronization" target="contents">Thread Synchronization Functions</a>, 48<a href="OSCreateThread.html">OSCreateThread</a>, 49<a href="OSGetThreadPriority.html">OSGetThreadPriority</a> 50</p> 51 52<H2>Revision History</H2> 53<P> 542006/03/01 Initial version.<br> 55</P> 56 57<hr><p>CONFIDENTIAL</p></body> 58</html>