#include <pthread.h>
int
pthread_attr_destroy
(pthread_attr_t * attr );
The pthread_attr_destroy function destroys the given thread attribute object.
The pthread_attr_destroy function returns 0.
None.
#include <pthread.h>
int
pthread_attr_getdetachstate
(pthread_attr_t
* attr , int * detachstate );
The pthread_attr_getdetachstate function gets the value of the detachstate attribute from attr object.
The pthread_attr_getdetachstate function returns zero if successful and -1 otherwise.
None.
#include <pthread.h>
int
pthread_attr_getinheritsched
(pthread_attr_t
* attr , int * inherit );
The pthread_attr_getinheritsched function gets the value of the inheritsched attribute.
The pthread_attr_getinheritsched function returns zero if successful and -1 otherwise.
None.
#include <pthread.h>
int
pthread_attr_getschedparam
(pthread_attr_t *
attr , struct sched_param *
param );
The pthread_attr_getschedparam function gets the value of the scheduling parameter attribute.
The pthread_attr_getschedparam function returns zero if successful and -1 otherwise.
The scheduling parameter attribute consists of the thread priority.
#include <pthread.h>
int
pthread_attr_getschedpolicy
(pthread_attr_t
* attr , int * policy );
The pthread_attr_getschedpolicy function gets the policy for the given attribute.
The pthread_attr_getschedpolicy function returns zero if the given attribute is valid and -1 otherwise.
None.
#include <pthread.h>
int
pthread_attr_init
(pthread_attr_t * attr );
The pthread_attr_init function initializes a thread attribute object with default values.
The pthread_attr_init function returns zero if the call is successful, otherwise it sets errno to EINVAL and returns -1.
The default priority is 0.
The default stack size is 8192 bytes on the ERC32, and 1024 words (2048 bytes) on the 1750.
#include <pthread.h>
int
pthread_attr_setdetachstate
(pthread_attr_t
* attr , int detachstate );
The pthread_attr_setdetachstate function sets the detachstate attribute in referenced attr object.
The pthread_attr_setdetachstate function returns zero if the call is successful, otherwise it sets errno to EINVAL and returns -1.
None.
#include <pthread.h>
int
pthread_attr_setinheritsched
(pthread_attr_t
* attr , int inherit );
The pthread_attr_setinheritsched function sets the inheritsched attribute in the referenced attr object.
The pthread_attr_setinheritsched function returns zero if the call is successful, otherwise it sets errno to EINVAL and returns -1.
None.
#include <pthread.h>
int
pthread_attr_setschedparam
(pthread_attr_t *
attr , struct sched_param *
param );
The pthread_attr_setschedparam function sets the priority in the referenced attr object.
The pthread_attr_setschedparam function returns zero if the call is successful, otherwise it sets errno to EINVAL and returns -1.
None.
#include <pthread.h>
int
pthread_attr_setschedpolicy
(pthread_attr_t
* attr , int policy );
The pthread_attr_setschedpolicy function sets the scheduling policy.
The pthread_attr_setschedpolicy function returns zero if the call is successful, otherwise it sets errno to EINVAL and returns -1.
The value for policy must be SCHED_FIFO.
#include <pthread.h>
int
pthread_attr_setstacksize
(pthread_attr_t *
attr , size_t stacksize );
The pthread_attr_setstacksize function sets the stack size value on the given attribute.
The pthread_attr_setstacksize function returns zero if the call is successful, otherwise it sets errno to EINVAL and returns -1.
None.