A thread attributes object allows you to specify values for thread attributes other than the defaults when you create a thread with the pthread_create( ) routine. To use a thread attributes object, perform the following steps:
1. Create a thread attributes object by calling the routine pthread_attr_create( ).
2. Call the routines discussed in the following topics to set the individual attributes of the thread attributes object.
3. Create a new thread by calling the pthread_create( ) routine and specifying the identifier of the thread attributes object.
You have control over the following attributes of a new thread:
· Scheduling policy attribute
· Scheduling priority attribute
· Inherit scheduling attribute
· Stacksize attribute
More: