pthread_condattr_init.txt
来自「Pthread lib库完整说明文档」· 文本 代码 · 共 89 行
TXT
89 行
pthread_condattr_init SubroutinePurposeCreates a condition attributes object and initializes it with defaultvalues.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_condattr_init (attr)pthread_condattr_t *attr;DescriptionThe pthread_condattr_init subroutine creates a new condition attributesobject attr. The new condition attributes object is initialized withthe following default values:------------------------------------------------------------------------------------------------------------------|Initialized if _POSIX_THREAD_PROCESS_SHARED is defined ||------------------------------------------------------------|---------------------------------------------------||Attribute |Defaultvalue ||------------------------------------------------------------|---------------------------------------------------||Pshared |PTHREAD_PROCESS_PRIVATE || |thedefault ensures compatibility with || |implementationsthat do not support this POSIX || |option. |------------------------------------------------------------------------------------------------------------------Note: The pthread.h header file must be the first included file ofeach source file using the threads library.Parameterattr Specifes the condition attributes object to be created.Return ValuesUpon successful completion, the new condition attributes object isfilled with default values and returned via the attr parameter, and0 is returned. Otherwise, an error code is returned.Error CodeThe pthread_condattr_init subroutine is unsuccessful if the followingis true:EINVAL The attr parameter is not valid.ENOMEM There is not sufficient memory to create the condition attributesobject.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.The process sharing POSIX option is not implemented in AIX.Related InformationThe pthread_condattr_setpshared subroutine, pthread_cond_init subroutine,pthread_condattr_destroy subroutine.Using Condition Variables.Threads Library Options.Threads Library Quick Reference.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?