pthread_attr_destroy 2. Syntax 3. Param 4. Return Value 5. Remark 6. Example 7. Issue

Destroy the thread attributes object.

2. Syntax

1
int pthread_attr_destroy(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_destroy() function shall destroy a thread attributes object. An implementation may cause pthread_attr_destroy() to set attr to an implementation-defined invalid value.

  • A destroyed attr attributes object can be reinitialized using pthread_attr_init().

-

  • A destroyed attr attributes object can be reinitialized using pthread_attr_init(); the results of otherwise referencing the object after it has been destroyed are undefined.

  • The behavior is undefined if the value specified by the attr argument to pthread_attr_destroy() does not refer to an initialized thread attributes object.

6. Example

7. Issue