distortos  v0.6.0
object-oriented C++ RTOS for microcontrollers
ConditionVariable.h
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_C_API_CONDITIONVARIABLE_H_
13 #define INCLUDE_DISTORTOS_C_API_CONDITIONVARIABLE_H_
14 
16 
17 #include <stdint.h>
18 
19 #ifdef __cplusplus
20 extern "C"
21 {
22 #endif /* def __cplusplus */
23 
24 struct distortos_Mutex;
25 
31 /*---------------------------------------------------------------------------------------------------------------------+
32 | global types
33 +---------------------------------------------------------------------------------------------------------------------*/
34 
45 {
48 };
49 
50 /*---------------------------------------------------------------------------------------------------------------------+
51 | global defines
52 +---------------------------------------------------------------------------------------------------------------------*/
53 
62 #define DISTORTOS_CONDITIONVARIABLE_INITIALIZER(self) {ESTD_INTRUSIVELIST_INITIALIZER((self).blockedList)}
63 
72 #define DISTORTOS_CONDITIONVARIABLE_CONSTRUCT(name) \
73  struct distortos_ConditionVariable name = DISTORTOS_CONDITIONVARIABLE_INITIALIZER(name)
74 
75 /*---------------------------------------------------------------------------------------------------------------------+
76 | global functions
77 +---------------------------------------------------------------------------------------------------------------------*/
78 
95 
113 
131 
149 
169  struct distortos_Mutex* mutex);
170 
194  struct distortos_Mutex* mutex, int64_t duration);
195 
219  struct distortos_Mutex* mutex, int64_t timePoint);
220 
225 #ifdef __cplusplus
226 } /* extern "C" */
227 #endif /* def __cplusplus */
228 
229 #endif /* INCLUDE_DISTORTOS_C_API_CONDITIONVARIABLE_H_ */
C-API for estd::IntrusiveList.
C-API equivalent of estd::IntrusiveList.
Definition: IntrusiveList.h:32
int distortos_ConditionVariable_notifyOne(struct distortos_ConditionVariable *conditionVariable)
C-API equivalent of distortos::ConditionVariable::notifyOne()
Definition: C-API-ConditionVariable.cpp:59
int distortos_ConditionVariable_waitFor(struct distortos_ConditionVariable *conditionVariable, struct distortos_Mutex *mutex, int64_t duration)
C-API equivalent of distortos::ConditionVariable::waitFor()
Definition: C-API-ConditionVariable.cpp:79
struct estd_IntrusiveList blockedList
Definition: ConditionVariable.h:47
int distortos_ConditionVariable_notifyAll(struct distortos_ConditionVariable *conditionVariable)
C-API equivalent of distortos::ConditionVariable::notifyAll()
Definition: C-API-ConditionVariable.cpp:49
int distortos_ConditionVariable_destruct(struct distortos_ConditionVariable *conditionVariable)
C-API equivalent of distortos::ConditionVariable&#39;s destructor.
Definition: C-API-ConditionVariable.cpp:39
int distortos_ConditionVariable_waitUntil(struct distortos_ConditionVariable *conditionVariable, struct distortos_Mutex *mutex, int64_t timePoint)
C-API equivalent of distortos::ConditionVariable::waitUntil()
Definition: C-API-ConditionVariable.cpp:90
int distortos_ConditionVariable_wait(struct distortos_ConditionVariable *conditionVariable, struct distortos_Mutex *mutex)
C-API equivalent of distortos::ConditionVariable::wait()
Definition: C-API-ConditionVariable.cpp:69
int distortos_ConditionVariable_construct(struct distortos_ConditionVariable *conditionVariable)
C-API equivalent of distortos::ConditionVariable&#39;s constructor.
Definition: C-API-ConditionVariable.cpp:30
C-API equivalent of distortos::ConditionVariable.
Definition: ConditionVariable.h:44
C-API equivalent of distortos::Mutex.
Definition: Mutex.h:43