52 lines
2.2 KiB
HTML
52 lines
2.2 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 ID vs. Pthread Handle (pthread_t)</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. -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!-- 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>
|
|
<!-- Java sync-link -->
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
|
</script>
|
|
|
|
<h2>Thread ID vs. Pthread Handle (pthread_t)</h2>
|
|
|
|
<p>In many threads implementations, the pthread_t abstract type is implemented
|
|
as an integer (4 byte) thread ID. In the iSeries implementation of Pthreads, the
|
|
thread ID is a 64-bit integral value and the pthread_t is an abstraction
|
|
(structure) that contains that value and others. This abstraction helps to
|
|
allow the implementation to scale to thousands of threads in a process.</p>
|
|
|
|
<p>Do not allow your program to rely on the internal structure or size of the
|
|
pthread_t in a non-portable fashion, such as comparisons of thread IDs. For
|
|
portable comparison, use the pthread_equal() API. This documentation
|
|
occasionally refers to the pthread_t as a Pthread handle to try to prevent the
|
|
misconception that it represents a single integer value.</p>
|
|
|
|
<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>
|
|
|