pthread_kill.txt
来自「Pthread lib库完整说明文档」· 文本 代码 · 共 77 行
TXT
77 行
--------------------------------------------------------------------------------AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1--------------------------------------------------------------------------------pthread_kill SubroutinePurposeSends a signal to the specified thread.LibraryThreads Library (libpthreads.a)Syntax#include <signal.h>int pthread_kill (pthread_t thread, int sig);DescriptionThe pthread_kill subroutine sends the signal signal to the thread thread. It actswith threads like the kill subroutine with single-threaded processes.If the receiving thread has blocked delivery of the signal, the signal remainspending on the thread until the thread unblocks delivery of the signal or theaction associated with the signal is set to ignore the signal. 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 target thread for the signal.signal Specifies the signal to be delivered. If the signal value is 0, errorchecking is performed, but no signal is delivered.Return ValuesUpon successful completion, the function returns a value of zero. Otherwise thefunction returns an error number. If the pthread_kill function fails, no signalis sent.Error CodesThe pthread_kill function will fail if:ESRCH No thread could be found corresponding to that specified by the giventhread ID.EINVAL The value of the sig argument is an invalid or unsupported signal number.The pthread_kill function will not return an error code of EINTR.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.Related InformationThe kill subroutine, pthread_cancel subroutine, pthread_create subroutine,sigaction subroutine, pthread_self subroutine, raise subroutine, pthread.h file.Signal Management 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 + =
减小字号Ctrl + -
显示快捷键?