📄 posix 线程详解1.htm
字号:
<TD><SPAN
class=spacer> </SPAN></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!--
<script src="//www.ibm.com/common/v14/pmh.js" language="JavaScript" type="text/javascript"></script>
--><!-- end masthead dw liquid --><!--MASTHEAD_END-->
<TABLE id=v14-body-table cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top><!--LEFTNAV_BEGIN-->
<TD id=navigation width=150>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=left-nav-spacer><A class=left-nav-overview
href="http://www.ibm.com/developerworks/cn/"> </A></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=left-nav-overview colSpan=2><A class=left-nav-overview
href="http://www.ibm.com/developerworks/cn/">developerWorks<BR>中国</A></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=left-nav-highlight colSpan=2><A class=left-nav
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#">本文内容包括:</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#N10046">线程是有趣的</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#N1005E">线程是快捷的</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#N1006A">线程是可移植的</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#N1007C">第一个线程</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#N1009D">理解
thread1.c</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#N100BB">无父,无子</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#N100CA">同步漫游</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#N100DD">理解
thread2.c</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#resources">参考资料
</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#author">关于作者</A></TD></TR>
<TR class=left-nav-child-highlight>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/cl-bullet.gif"
width=2></TD>
<TD><A class=left-nav-child
href="http://www-128.ibm.com/developerworks/cn/linux/thread/posix_thread1/index.html#rate">对本文的评价</A></TD></TR>
<TR class=left-nav-last>
<TD width=14><IMG class=display-img height=1 alt=""
src="POSIX 线程详解1.files/c.gif" width=14></TD>
<TD width=136><IMG class=display-img height=19 alt=""
src="POSIX 线程详解1.files/left-nav-corner.gif"
width=136></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=related colSpan=2><B class=related>相关链接:</B></TD></TR>
<TR class=rlinks>
<TD><IMG height=8 alt="" src="POSIX 线程详解1.files/rl-bullet.gif"
width=2></TD>
<TD><A class=rlinks
href="http://www.ibm.com/developerworks/cn/views/linux/articles.jsp">Linux
技术文档库</A></TD></TR><!--START RESERVED FOR FUTURE USE INCLUDE FILES--><!-- No content currently --><!--END RESERVED FOR FUTURE USE INCLUDE FILES-->
<TR>
<TD width=14><IMG class=display-img height=1 alt=""
src="POSIX 线程详解1.files/c.gif" width=14></TD>
<TD width=136><IMG class=display-img height=19 alt=""
src="POSIX 线程详解1.files/c.gif" width=136></TD></TR></TBODY></TABLE><!--START RESERVED FOR FUTURE USE INCLUDE FILES--><!-- No content currently --><!--END RESERVED FOR FUTURE USE INCLUDE FILES--></TD><!--LEFTNAV_END-->
<TD width="100%">
<TABLE id=content-table cellSpacing=0 cellPadding=0 width="100%"
border=0><TBODY>
<TR vAlign=top>
<TD width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><A name=main><IMG height=1 alt="skip to main content"
src="POSIX 线程详解1.files/c.gif" width=592
border=0></A></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD width=10 height=18><IMG height=18 alt=""
src="POSIX 线程详解1.files/c.gif" width=10></TD>
<TD width="100%"><IMG height=6 alt=""
src="POSIX 线程详解1.files/c.gif" width=1><BR><A class=bctl
href="http://www.ibm.com/developerworks/cn/">developerWorks
中国</A><SPAN class=bct> > </SPAN><A
class=bctl
href="http://www.ibm.com/developerworks/cn/linux/">Linux</A><SPAN
class=bct> ></SPAN><IMG height=1 alt=""
src="POSIX 线程详解1.files/c.gif" width=1><BR>
<H1>POSIX 线程详解</H1>
<P id=subtitle><EM>一种支持内存共享的简捷工具</EM></P><IMG
class=display-img height=6 alt=""
src="POSIX 线程详解1.files/c.gif" width=1></TD>
<TD class=no-print width=192><IMG height=18 alt=developerWorks
src="POSIX 线程详解1.files/dw.gif"
width=192></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR vAlign=top>
<TD width=10><IMG height=1 alt="" src="POSIX 线程详解1.files/c.gif"
width=10></TD>
<TD width="100%">
<TABLE class=no-print cellSpacing=0 cellPadding=0 width=160
align=right border=0>
<TBODY>
<TR>
<TD width=10><IMG height=1 alt=""
src="POSIX 线程详解1.files/c.gif" width=10></TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=v14-header-1-small>文档选项</TD></TR></TBODY></TABLE>
<TABLE class=v14-gray-table-border cellSpacing=0 cellPadding=0
border=0>
<TBODY>
<TR>
<TD class=no-padding width=150>
<TABLE cellSpacing=0 cellPadding=0 width=143
border=0><IMG height=1 alt=""
src="POSIX 线程详解1.files/c.gif" width=8>
<FORM name=email
action=https://www-128.ibm.com/developerworks/secure/email-it.jsp><INPUT
type=hidden
value="POSIX(可移植操作系统接口)线程是提高代码响应和性能的有力手段。在本系列中,Daniel Robbins 向您精确地展示在编程中如何使用线程。其中还涉及大量幕后细节,读完本系列文章,您完全可以运用 POSIX 线程创建多线程程序。"
name=body><INPUT type=hidden value="POSIX 线程详解"
name=subject><INPUT type=hidden value=cn name=lang>
<SCRIPT language=JavaScript type=text/javascript><!--document.write('<tr valign="top"><td width="8"><img src="//www.ibm.com/i/c.gif" width="8" height="1" alt=""/></td><td width="16"><img src="//www.ibm.com/i/v14/icons/em.gif" height="16" width="16" vspace="3" alt="将此页作为电子邮件发送" /></td><td width="122"><p><a class="smallplainlink" href="javascript:document.email.submit();"><b>将此页作为电子邮件发送</b></a></p></td></tr>');//--></SCRIPT>
<NOSCRIPT>
<TBODY>
<TR vAlign=top>
<TD width=8><IMG height=1 alt=""
src="POSIX 线程详解1.files/c.gif" width=8></TD>
<TD width=16><IMG height=16 alt=""
src="POSIX 线程详解1.files/c.gif" width=16></TD>
<TD class=small width=122>
<P><SPAN class=ast>未显示需要 JavaScript
的文档选项</SPAN></P></TD></TR></NOSCRIPT></FORM></TBODY></TABLE></TD></TR></TBODY></TABLE><!--START RESERVED FOR FUTURE USE INCLUDE FILES--><!-- 03/20/06 updated by gretchen --><BR>
<TABLE cellSpacing=0 cellPadding=0 width=150 border=0>
<TBODY>
<TR>
<TD class=v14-header-2-small>最新推荐</TD></TR></TBODY></TABLE>
<TABLE class=v14-gray-table-border cellSpacing=0 cellPadding=0
border=0>
<TBODY>
<TR>
<TD class=no-padding width=150>
<TABLE cellSpacing=0 cellPadding=0 width=143 border=0>
<TBODY>
<TR vAlign=top>
<TD width=8><IMG height=1 alt=""
src="POSIX 线程详解1.files/c.gif" width=8></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -