Attributes Objects for Threads
- pthread_attr_init;
- This function initializes the attributes object attr to the default values.
- Upon successful completion, the function returns a 0, otherwise it returns an error code.
- The attributes object may be destroyed.
- pthread_attr_destroy;
- The call returns a 0 on successful removal of the attributes object attr.
- Individual properties associated with the attributes object can be changed using the following functions:
- pthread_attr_setdetachstate
to set the detach state
- pthread_attr_setguardsize_np
to set the stack guard size
- pthread_attr_setstacksize
to set the stack size
- pthread_attr_setstackaddr
to set the stack address
- pthread_attr_setinheritsched
to set whether scheduling policy is inherited from the creating thread
- pthread_attr_setschedpolicy
to set the scheduling policy (in case it is not inherited)
- pthread_attr_setschedparam
to set the scheduling parameters
- pthread_attr_setprio
to set the priority
- pthread_attr_default, pthread_attr_init
- For most parallel programs, default thread properties are generally adequate.
Cem Ozdogan
2010-12-27