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

📄 pthread_cancel.txt

📁 Pthread lib库完整说明文档
💻 TXT
字号:
           --------------------------------------------------------------------------------AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume                                       1--------------------------------------------------------------------------------pthread_cancel SubroutinePurposeRequests the cancellation of a thread.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_cancel (pthread_t thread);DescriptionThe pthread_cancel subroutine requests the cancellation of the thread thread. Theaction depends on the cancelability of the target thread:  o If its cancelability is disabled, the cancellation request is set pending.  o If its cancelability is deferred, the cancellation request is set pending    till the thread reaches a cancellation point.  o If its cancelability is asynchronous, the cancellation request is acted upon    immediately; in some cases, it may result in unexpected behaviour.The cancellation of a thread terminates it safely, using the same terminationprocedure as the pthread_exit subroutine.    Note: The pthread.h header file must be the first included file of each    source file using the threads library. Otherwise, the -D_THREAD_SAFE    compilation flag should be used, or the cc_r compiler used. In this case, the    flag is automatically set.Parametersthread Specifies the thread to be canceled.Return ValuesIf successful, the pthread_cancel function returns zero. Otherwise, an errornumber is returned to indicate the error.Error CodesThe ptread_cancel function may fail if:ESRCH No thread could be found corresponding to that specified by the giventhread ID.The pthread_cancel function will not return an error code of EINTR.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.Related InformationThe pthread_kill subroutine, pthread_exit subroutine, pthread_join subroutine,pthread_cond_wait, and pthread_cond_timedwait subroutines.The pthread.h file.Terminating Threads in AIX Version 4.3 General Programming Concepts: Writing andDebugging Programs.Threads Library Quick Reference in AIX Version 4.3 General Programming Concepts:Writing and Debugging Programs.--------------------------------------------------------------------------------           

⌨️ 快捷键说明

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