⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pthread_cancel.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>pthread_cancel</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_007_1198">&nbsp;</a>NAME</h4><blockquote>pthread_cancel - cancel execution of a thread</blockquote><h4><a name = "tag_000_007_1199">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="pthread.h.html">pthread.h</a>&gt;int pthread_cancel(pthread_t <i>thread</i>);</code></pre></blockquote><h4><a name = "tag_000_007_1200">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>pthread_cancel()</i>function requests that<i>thread</i>be canceled.The target threads cancelability state and typedetermines when the cancellation takes effect.When the cancellation is acted on, thecancellation cleanup handlers for<i>thread</i>are called.When the last cancellation cleanup handler returns,the thread-specific data destructor functions are called for<i>thread</i>.When the last destructor function returns,<i>thread</i>is terminated.<p>The cancellation processing in the target thread runs asynchronouslywith respect to the calling thread returning from<i>pthread_cancel()</i>.</blockquote><h4><a name = "tag_000_007_1201">&nbsp;</a>RETURN VALUE</h4><blockquote>If successful, the<i>pthread_cancel()</i>function returns zero.Otherwise, an error number is returned to indicate the error.</blockquote><h4><a name = "tag_000_007_1202">&nbsp;</a>ERRORS</h4><blockquote>The <i>pthread_cancel()</i>function may fail if:<dl compact><dt>[ESRCH]<dd>No thread could be found corresponding to that specifiedby the given thread ID.</dl><p>The<i>pthread_cancel()</i>function will not return an error code of [EINTR].</blockquote><h4><a name = "tag_000_007_1203">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1204">&nbsp;</a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1205">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_1206">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="pthread_exit.html">pthread_exit()</a></i>,<i><a href="pthread_join.html">pthread_join()</a></i>,<i><a href="pthread_setcancelstate.html">pthread_setcancelstate()</a></i>,<i><a href="pthread_cond_wait.html">pthread_cond_wait()</a></i>,<i><a href="pthread_cond_timedwait.html">pthread_cond_timedwait()</a></i>,<i><a href="pthread.h.html">&lt;pthread.h&gt;</a></i>.</blockquote><h4>DERIVATION</h4><blockquote>Derived from the POSIX Threads Extension (1003.1c-1995)</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -