Initialize the thread attributes object.
2. Syntax
1 |
int pthread_attr_init(pthread_attr_t *attr); |
3. Param
attr
Thread attributes object.
4. Return Value
Upon successful, return zero; otherwise, an error number shall be returned to indicate the error.
5. Remark
-
The pthread_attr_init() function shall initialize a thread attributes object attr with the default value for all of the individual attributes used by a given implementation.
-
The resulting attributes object (possibly modified by setting individual attribute values) when used by pthread_create() defines the attributes of the thread created. A single attributes object can be used in multiple simultaneous calls to pthread_create().
-
- Results are undefined if pthread_attr_init() is called specifying an already initialized attr attributes object.
近期评论