pthread_attr_getdetachstate.txt
来自「Pthread lib库完整说明文档」· 文本 代码 · 共 73 行
TXT
73 行
pthread_attr_getdetachstate SubroutinePurposeReturns the value of the detachstate attribute of a thread attributesobject.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_attr_getdetachstate (attr, detachstate)const pthread_attr_t *attr;int *detachstate;DescriptionThe pthread_attr_getdetachstate subroutine returns the value of thedetachstate attribute of the thread attributes object attr. This attributespecifies the detached state of the thread created with this attributesobject. It may have one of the following values:PTHREAD_CREATE_DETACHED Specifies that the thread will be createdin detached state. This is the default value.PTHREAD_CREATE_UNDETACHED Specifies that the thread will be createdin undetached state.Note: The pthread.h header file must be the first included file ofeach source file using the threads library.Parametersattr Specifies the thread attributes object.detachstate Points to where the detachstate attribute value will bestored.Return ValuesUpon successful completion, the value of the detached state attributeis returned via the detachstate parameter, and 0 is returned. Otherwise,an error code is returned.Error CodesThe pthread_attr_getdetachstate subroutine is unsuccessful if thefollowing is true:EINVAL The attr parameter is not valid.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.Related InformationThe pthread_attr_setdetachstate subroutine, pthread_attr_init subroutine.Creating Threads.Threads Library Quick Reference.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?