25 #include <nucleus/synch.h>
29 #define EV_PRIO XNSYNCH_PRIO
30 #define EV_FIFO XNSYNCH_FIFO
36 typedef struct rt_event_info {
42 char name[XNOBJECT_NAME_LEN];
46 typedef struct rt_event_placeholder {
48 } RT_EVENT_PLACEHOLDER;
50 #if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)
54 #define XENO_EVENT_MAGIC 0x55550404
56 typedef struct rt_event {
66 char name[XNOBJECT_NAME_LEN];
68 #ifdef CONFIG_XENO_OPT_PERVASIVE
74 #define rlink2event(ln) container_of(ln, RT_EVENT, rlink)
84 #ifdef CONFIG_XENO_OPT_NATIVE_EVENT
86 int __native_event_pkg_init(
void);
88 void __native_event_pkg_cleanup(
void);
90 static inline void __native_event_flush_rq(xnqueue_t *rq)
92 xeno_flush_rq(RT_EVENT, rq, event);
95 int rt_event_wait_inner(RT_EVENT *event,
97 unsigned long *mask_r,
98 int mode, xntmode_t timeout_mode, RTIME timeout);
102 #define __native_event_pkg_init() ({ 0; })
103 #define __native_event_pkg_cleanup() do { } while(0)
104 #define __native_event_flush_rq(rq) do { } while(0)
114 typedef RT_EVENT_PLACEHOLDER RT_EVENT;
127 event->opaque = XN_NO_HANDLE;
145 unsigned long ivalue,
155 unsigned long *mask_r,
161 unsigned long *mask_r,
167 unsigned long *mask_r);
170 RT_EVENT_INFO *info);
int rt_event_inquire(RT_EVENT *event, RT_EVENT_INFO *info)
Inquire about an event group.
Definition: event.c:89
int rt_event_wait(RT_EVENT *event, unsigned long mask, unsigned long *mask_r, int mode, RTIME timeout)
Pend on an event group.
Definition: event.c:43
static int rt_event_unbind(RT_EVENT *event)
Unbind from an event flag group.
Definition: event.h:124
int rt_event_signal(RT_EVENT *event, unsigned long mask)
Post an event group.
Definition: event.c:77
int rt_event_wait_until(RT_EVENT *event, unsigned long mask, unsigned long *mask_r, int mode, RTIME timeout)
Pend on an event group (with absolute timeout date).
Definition: event.c:60
This file is part of the Xenomai project.
int rt_event_bind(RT_EVENT *event, const char *name, RTIME timeout)
Bind to an event flag group.
Definition: event.c:32
int rt_event_create(RT_EVENT *event, const char *name, unsigned long ivalue, int mode)
Create an event group.
Definition: event.c:24
int rt_event_clear(RT_EVENT *event, unsigned long mask, unsigned long *mask_r)
Clear an event group.
Definition: event.c:83
int rt_event_delete(RT_EVENT *event)
Delete an event group.
Definition: event.c:38
This file is part of the Xenomai project.