pthread_cond.h¶
RIOT POSIX condition variable API.
-
int
pthread_cond_condattr_init
(pthread_condattr_t * attr)¶ Initializes a condition attribute variable object using default values.
Parameters
attr: pre-allocated condition attribute variable structure. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_cond_condattr_destroy
(pthread_condattr_t * attr)¶ Uninitializes a condition attribute variable object.
Parameters
attr: pre-allocated condition attribute variable structure. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_condattr_getpshared
(const pthread_condattr_t * attr, int * pshared)¶ Get the process-shared attribute in an initialized attributes object referenced by attr.
Note
NOT USED since RIOT is a single process OS
Parameters
attr: pre-allocated condition attribute variable structure. pshared: the pre-allocated process-shared variable. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_condattr_setpshared
(pthread_condattr_t * attr, int pshared)¶ Set the process-shared attribute in an initialized attributes object referenced by attr.
Note
NOT USED since RIOT is a single process OS
Parameters
attr: pre-allocated condition attribute variable structure. pshared: pshared the pre-allocated process-shared variable. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_condattr_getclock
(const pthread_condattr_t * attr,msp430_types.h::clockid_t
* clock_id)¶ Get the clock selected for the conditon variable attribute attr.
Note
currently NOT USED in RIOT.
Parameters
attr: pre-allocated condition attribute variable structure. clock_id: the clock ID that is used to measure the timeout service Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_condattr_setclock
(pthread_condattr_t * attr,msp430_types.h::clockid_t
clock_id)¶ Set the clock selected for the conditon variable attribute ATTR.
Note
currently NOT USED in RIOT.
Parameters
attr: pre-allocated condition attribute variable structure. clock_id: the clock ID that shall be used to measure the timeout service Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_cond_init
(pthread_cond_t * cond, pthread_condattr_t * attr)¶ Initializes a condition variable object.
Parameters
cond: pre-allocated condition variable structure. attr: pre-allocated condition attribute variable structure. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_cond_destroy
(pthread_cond_t * cond)¶ Destroy the condition variable cond.
Parameters
cond: pre-allocated condition variable structure. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_cond_wait
(pthread_cond_t * cond, mutex_t * mutex)¶ blocks the calling thread until the specified condition cond is signalled
Parameters
cond: pre-allocated condition variable structure. mutex: pre-allocated mutex variable structure. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_cond_timedwait
(pthread_cond_t * cond, mutex_t * mutex, const struct timespec * abstime)¶ blocks the calling thread until the specified condition cond is signalled
Parameters
cond: pre-allocated condition variable structure. mutex: pre-allocated mutex variable structure. abstime: pre-allocated timeout. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_cond_signal
(pthread_cond_t * cond)¶ unblock at least one of the threads that are blocked on the specified condition variable cond
Parameters
cond: pre-allocated condition variable structure. Return values
- returns 0 on success, an errorcode otherwise.
-
int
pthread_cond_broadcast
(pthread_cond_t * cond)¶ unblock all threads that are currently blocked on the specified condition variable cond
Parameters
cond: pre-allocated condition variable structure. Return values
- returns 0 on success, an errorcode otherwise.
-
struct
pthread_condattr_t
¶ Note
condition attributes are currently NOT USED in RIOT condition variables
-
int
__dummy
¶ dumdidum
-
int
-
struct
pthread_cond_t
¶ Condition variable.
-
priority_queue_t
queue
¶ Threads currently waiting to be signaled.
-
priority_queue_t