ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/rzah4pri.htm

155 lines
4.6 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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>Primitive data types for Pthreads</title>
<!-- Begin Header Records ========================================== -->
<!-- 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. -->
<!-- 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 -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>Primitive data types for Pthreads</h2>
<p>The Pthread types and functions have the following naming conventions. If
the type of object is not a thread, <strong>object</strong> represents the type
of object, <strong>action</strong> is an operation to be performed on the
object, <strong>np</strong> or <strong>NP</strong> indicates that the name or
symbol is a non-portable extension to the API set, and <strong>PURPOSE</strong>
indicates the use or purpose of the symbol.</p>
<dl>
<dt><strong>types</strong></dt>
<dd>pthread[<em>_object</em>][<strong>_np</strong>]_t<br>
<br>
</dd>
<dt><strong>functions</strong></dt>
<dd>pthread[<em>_object</em>]_action[<strong>_np</strong>]<br>
<br>
</dd>
<dt><strong>Constants and Macros</strong></dt>
<dd>PTHREAD_<em>PURPOSE</em>[<strong>_NP</strong>]</dd>
</dl>
<table border width="80%">
<tr>
<th valign="top">Type</th>
<th valign="top">Description</th>
</tr>
<tr>
<td align="left" valign="top">pthread_attr_t</td>
<td align="left" valign="top">Thread creation attribute</td>
</tr>
<tr>
<td align="left" valign="top">pthread_cleanup_entry_np_t</td>
<td align="left" valign="top">Cancellation cleanup handler entry</td>
</tr>
<tr>
<td align="left" valign="top">pthread_condattr_t</td>
<td align="left" valign="top">Condition variable creation attribute</td>
</tr>
<tr>
<td align="left" valign="top">pthread_cond_t</td>
<td align="left" valign="top">Condition Variable synchronization primitive</td>
</tr>
<tr>
<td align="left" valign="top">pthread_joinoption_np_t</td>
<td align="left" valign="top">Options structure for extensions to
pthread_join()</td>
</tr>
<tr>
<td align="left" valign="top">pthread_key_t</td>
<td align="left" valign="top">Thread local storage key</td>
</tr>
<tr>
<td align="left" valign="top">pthread_mutexattr_t</td>
<td align="left" valign="top">Mutex creation attribute</td>
</tr>
<tr>
<td align="left" valign="top">pthread_mutex_t</td>
<td align="left" valign="top">Mutex (Mutual exclusion) synchronization
primitive</td>
</tr>
<tr>
<td align="left" valign="top">pthread_once_t</td>
<td align="left" valign="top">Once time initialization control variable</td>
</tr>
<tr>
<td align="left" valign="top">pthread_option_np_t</td>
<td align="left" valign="top">Pthread run-time options structure</td>
</tr>
<tr>
<td align="left" valign="top">pthread_rwlockattr_t</td>
<td align="left" valign="top">Read/Write lock attribute</td>
</tr>
<tr>
<td align="left" valign="top">pthread_rwlock_t</td>
<td align="left" valign="top">Read/Write synchronization primitive</td>
</tr>
<tr>
<td align="left" valign="top">pthread_t</td>
<td align="left" valign="top">Pthread handle</td>
</tr>
<tr>
<td align="left" valign="top">pthread_id_np_t</td>
<td align="left" valign="top">Thread ID. For use as an integral type.</td>
</tr>
<tr>
<td align="left" valign="top">struct sched_param</td>
<td align="left" valign="top">Scheduling parameters (priority and policy)</td>
</tr>
</table>
<p>After creating the primitive objects of type <strong>pthread_cond_t</strong>
and <strong>pthread_mutex_t</strong> using the appropriate initialization
functions, those objects must not be copied or moved to a new location. If the
condition variable or mutex is copied or moved to a new location, the new
primitive object is not valid or usable. Attempts to use the new object result
in the <strong>EINVAL</strong> error.</p>
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center">
<a href="#Top_Of_Page">Top</a> |
<a href="rzah4mst.htm">Pthread APIs</a> |
<a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>