67 lines
3.3 KiB
HTML
67 lines
3.3 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>Thread specific storage APIs</title>
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<!-- Begin Header Records ========================================== -->
|
||
|
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
|
||
|
<!--File Edited November 2001 -->
|
||
|
<!-- 031112 JETAYLOR replaced API and/or Exit listings with -->
|
||
|
<!-- pagegenerator output from javascript array -->
|
||
|
<!--End Header Records -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<!-- Java sync-link -->
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<h2>Thread specific storage APIs</h2>
|
||
|
|
||
|
<p>Thread specific storage is used by your threaded application when you need
|
||
|
global storage that is `private' to a thread. The storage is allocated and
|
||
|
stored by the thread, and can be associated with a destructor function. When
|
||
|
the thread ends using one of the pthread mechanisms, the destructor function
|
||
|
runs and cleans up the thread local storage. The thread specific storage can
|
||
|
replace global storage, because any function in a thread that requests the
|
||
|
thread specific storage will get the same value. Functions in another thread
|
||
|
that request the thread specific storage will get the thread specific storage
|
||
|
owned by the thread that they are called in.</p>
|
||
|
|
||
|
<p>For information about the examples included with the APIs, see the <a href=
|
||
|
"users_g3.htm">information on the API examples</a>.</p>
|
||
|
|
||
|
<p>The thread specific storage APIs are:</p>
|
||
|
|
||
|
<!-- ***** NOTE ***** Do not manually update text or links in this section. -->
|
||
|
<!-- Updates made in this section *will* be overlaid by automated tools -->
|
||
|
<!-- Notify User Technologies of needed updates to be made in XML for API finder.-->
|
||
|
<!--***************API BEGIN PASTE***************-->
|
||
|
<ul>
|
||
|
<li><A HREF="users_34.htm">pthread_getspecific()</A> (Get Thread Local Storage Value by Key) retrieves the thread local storage value associated with the key. pthread_getspecific() may be called from a data destructor.</li>
|
||
|
<li><A HREF="users_35.htm">pthread_key_create()</A> (Create Thread Local Storage Key) creates a thread local storage key for the process and associates the destructor function with that key.</li>
|
||
|
<li><A HREF="users_36.htm">pthread_key_delete()</A> (Delete Thread Local Storage Key) deletes a process-wide thread local storage key.</li>
|
||
|
<li><A HREF="users_37.htm">pthread_setspecific()</A> (Set Thread Local Storage by Key) sets the thread local storage value associated with a key.</li>
|
||
|
</ul>
|
||
|
<!--***************API END PASTE***************-->
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="rzah4mst.htm">Pthread APIs</a> | <a
|
||
|
href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|