1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
<HTML><HEAD><TITLE>ThreadKey Class</TITLE></HEAD>
<BODY bgcolor="#ffffff">
<H1>ThreadKey Class Reference</H1>
<p>
[<A HREF="index.html">APE Index</A>] [<A HREF="hier.html">APE Hierarchy</A>]
[<A HREF="header-list.html">Headers</A>]
</p>
<HR>
<P>container for thread specific data storage. <a href="#short">More...</a></P>
<P>
<code>
#include <<a href="thread-h.html">thread.h</a>>
</code>
</P>
<H2>Public Members</H2>
<UL>
<LI> <b><a href="#ref0">ThreadKey</a></b> ()
</LI>
<LI> <b><a href="#ref1">~ThreadKey</a></b> ()
</LI>
<LI>void* <b><a href="#ref2">getKey</a></b> (void)
</LI>
<LI>void <b><a href="#ref3">setKey</a></b> (void *)
</LI>
</UL>
<HR>
<H2><a name="short">Detailed Description</a></H2>
<P>
This class allows the creation of a thread context unique "pointer"
that can be set and retrieved and can be used to create thread specific
data areas for implementing "thread safe" library routines.
</P><HR>
<H3><b> <a name="ref0"></a><a name="ThreadKey">ThreadKey</a>() </b><code>[public]</code></H3>
<p>Create a unique thread specific container.
</p>
<H3><b> <a name="ref1"></a><a name="~ThreadKey">~ThreadKey</a>() </b><code>[public]</code></H3>
<p>Destroy a thread specific container and any contents reserved.
</p>
<H3><b>void* <a name="ref2"></a><a name="getKey">getKey</a>(void) </b><code>[public]</code></H3>
<p>Get the value of the pointer for the thread specific data
container. A unique pointer can be set for each execution
context.
</p><p>
</p>
<dl><dt><b>Returns</b>:<dd>
a unique void * for each execution context.</dl>
<H3><b>void <a name="ref3"></a><a name="setKey">setKey</a>(void *) </b><code>[public]</code></H3>
<p>Set the value of the pointer for the current thread specific
execution context. This can be used to store thread context
specific data.
</p><p>
</p>
<dl><dt><b>Parameters</b>:<dd>
<table width="100%" border="0">
<tr><td align="left" valign="top">
ptr</td><td align="left" valign="top">
to thread context specific data.</td></tr>
</table>
</dl>
<HR>
<TABLE WIDTH="100%"><TR><TD ALIGN="left" VALIGN="top">
<UL><LI><I>Author</I>: David Sugar <dyfet@ostel.com> </LI>
<LI>Documentation generated by dyfet@home.sys on Thu Dec 16 09:54:26 EST 1999
</LI>
</UL></TD><TD ALIGN="RIGHT" VALIGN="TOP">
<b>K</b><i>doc</i>
</TD>
</TR></TABLE></BODY></HTML>
|