?? pthread_attr_setdetachstate.txt
字號(hào):
pthread_attr_setdetachstate SubroutinePurposeSets the value of the detachstate attribute of a thread attributesobject.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_attr_setdetachstate (attr, detachstate)pthread_attr_t *attr;int detachstate;DescriptionThe pthread_attr_setdetachstate subroutine sets the value of the detachstateattribute of the thread attributes object attr. This attribute specifiesthe detached state of a thread created with this attributes object.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 Specifies the detached state to set. It must have oneof 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.Return ValuesUpon successful completion, 0 is returned. Otherwise, an error codeis returned.Error CodesThe pthread_attr_setdetachstate subroutine is unsuccessful if thefollowing is true:EINVAL The attr or detachstate parameters are not valid.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.Related InformationThe pthread_attr_getdetachstate subroutine, pthread_attr_init subroutine,pthread_create subroutine.Creating Threads.Threads Library Quick Reference.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -