Creates a thread attributes object.
pthread_attr_create( attr );
Argument Data Type Accessattr opaque pthread_attr_t read
int pthread_attr_create ( pthread_attr_t *attr);
The individual attributes (internal fields) of the attributes object are set to default values. (The default values of each attribute are discussed in the descriptions of the following routines.) Use the following routines to change the individual attributes:
pthread_attr_setinheritsched pthread_attr_setprio pthread_attr_setsched pthread_attr_setstacksize
When an attributes object is used to create a thread, the values of the individual attributes determine the characteristics of the new object. Attributes objects perform similar to additional arguments to object creation. Changing individual attributes does not affect any objects that were previously created using the attributes object.
When you set the scheduling policy or priority, or both, in an attributes object, you must disable scheduling inheritance before the scheduling attributes are used.
Return Error Description0 Successful completion. -1 [ENOMEM] Insufficient memory exists to create the thread attributes object. -1 [EINVAL] The value specified by attr is invalid.