Initialize a thread-attribute object
#include <pthread.h> int pthread_attr_init( pthread_attr_t *attr );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The pthread_attr_init() function initializes the thread attributes in the thread attribute object attr to their default values:
After initialization, you can use the pthread_attr_* family of functions to get and set the attributes:
You can also set some non-POSIX attributes; for more information, see QNX Neutrino extensions, in the documentation for pthread_create().
You can then pass the attribute object to pthread_create() to create a thread with the required attributes. You can use the same attribute object in multiple calls to pthread_create().
The effect of initializing an already-initialized thread-attribute object is undefined.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |