pthread_condattr_init Subroutine Purpose Creates a condition attributes object and initializes it with default values. Library Threads Library (libpthreads.a) Syntax #include int pthread_condattr_init (attr) pthread_condattr_t *attr; Description The pthread_condattr_init subroutine creates a new condition attributes object attr. The new condition attributes object is initialized with the following default values: ------------------------------------------------------------------------------------------------------------------ |Initialized if _POSIX_THREAD_PROCESS_SHARED is defined | |------------------------------------------------------------|---------------------------------------------------| |Attribute |Default value | |------------------------------------------------------------|---------------------------------------------------| |Pshared |PTHREAD_PROCESS_PRIVATE | | |the default ensures compatibility with | | |implementations that do not support this POSIX | | |option. | ------------------------------------------------------------------------------------------------------------------ Note: The pthread.h header file must be the first included file of each source file using the threads library. Parameter attr Specifes the condition attributes object to be created. Return Values Upon successful completion, the new condition attributes object is filled with default values and returned via the attr parameter, and 0 is returned. Otherwise, an error code is returned. Error Code The pthread_condattr_init subroutine is unsuccessful if the following is true: EINVAL The attr parameter is not valid. ENOMEM There is not sufficient memory to create the condition attributes object. Implementation Specifics This subroutine is part of the Base Operating System (BOS) Runtime. The process sharing POSIX option is not implemented in AIX. Related Information The pthread_condattr_setpshared subroutine, pthread_cond_init subroutine, pthread_condattr_destroy subroutine. Using Condition Variables. Threads Library Options. Threads Library Quick Reference.