27 typedef struct rt_cond_info {
31 char name[XNOBJECT_NAME_LEN];
35 typedef struct rt_cond_placeholder {
39 } RT_COND_PLACEHOLDER;
41 #if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)
43 #include <nucleus/synch.h>
46 #define XENO_COND_MAGIC 0x55550606
48 typedef struct rt_cond {
56 char name[XNOBJECT_NAME_LEN];
58 #ifdef CONFIG_XENO_OPT_PERVASIVE
64 #define rlink2cond(ln) container_of(ln, RT_COND, rlink)
74 #ifdef CONFIG_XENO_OPT_NATIVE_COND
76 int __native_cond_pkg_init(
void);
78 void __native_cond_pkg_cleanup(
void);
80 static inline void __native_cond_flush_rq(xnqueue_t *rq)
82 xeno_flush_rq(RT_COND, rq, cond);
85 int rt_cond_wait_prologue(RT_COND *cond, RT_MUTEX *mutex,
unsigned *plockcnt,
86 xntmode_t timeout_mode, RTIME timeout);
88 int rt_cond_wait_epilogue(RT_MUTEX *mutex,
unsigned lockcnt);
92 #define __native_cond_pkg_init() ({ 0; })
93 #define __native_cond_pkg_cleanup() do { } while(0)
94 #define __native_cond_flush_rq(rq) do { } while(0)
104 typedef RT_COND_PLACEHOLDER RT_COND;
117 cond->opaque = XN_NO_HANDLE;
int rt_cond_delete(RT_COND *cond)
Delete a condition variable.
Definition: cond.c:39
int rt_cond_signal(RT_COND *cond)
Signal a condition variable.
Definition: cond.c:140
This file is part of the Xenomai project.
This file is part of the Xenomai project.
int rt_cond_broadcast(RT_COND *cond)
Broadcast a condition variable.
Definition: cond.c:145
int rt_cond_wait_until(RT_COND *cond, RT_MUTEX *mutex, RTIME timeout)
Wait on a condition (with absolute timeout date).
Definition: cond.c:103
int rt_cond_bind(RT_COND *cond, const char *name, RTIME timeout)
Bind to a condition variable.
Definition: cond.c:33
int rt_cond_wait(RT_COND *cond, RT_MUTEX *mutex, RTIME timeout)
Wait on a condition.
Definition: cond.c:66
int rt_cond_create(RT_COND *cond, const char *name)
Create a condition variable.
Definition: cond.c:27
int rt_cond_inquire(RT_COND *cond, RT_COND_INFO *info)
Inquire about a condition variable.
Definition: cond.c:150
static int rt_cond_unbind(RT_COND *cond)
Unbind from a condition variable.
Definition: cond.h:114