25 #include <nucleus/intr.h>
29 #define I_NOAUTOENA XN_ISR_NOENABLE
31 #define I_PROPAGATE XN_ISR_PROPAGATE
34 typedef struct rt_intr_info {
41 char name[XNOBJECT_NAME_LEN];
45 typedef struct rt_intr_placeholder {
47 } RT_INTR_PLACEHOLDER;
49 #if (defined(__KERNEL__) || defined(__XENO_SIM__)) && !defined(DOXYGEN_CPP)
51 #include <nucleus/synch.h>
54 #define XENO_INTR_MAGIC 0x55550a0a
57 #define I_SHARED XN_ISR_SHARED
58 #define I_EDGE XN_ISR_EDGE
60 #define RT_INTR_HANDLED XN_ISR_HANDLED
61 #define RT_INTR_NONE XN_ISR_NONE
62 #define RT_INTR_PROPAGATE XN_ISR_PROPAGATE
63 #define RT_INTR_NOENABLE XN_ISR_NOENABLE
65 #define I_DESC(xintr) ((RT_INTR *)(xintr)->cookie)
67 typedef struct rt_intr {
77 char name[XNOBJECT_NAME_LEN];
79 #ifdef CONFIG_XENO_OPT_PERVASIVE
91 #define rlink2intr(ln) container_of(ln, RT_INTR, rlink)
97 #define rt_intr_save(x) splhigh(x)
98 #define rt_intr_restore(x) splexit(x)
99 #define rt_intr_unmask() splnone()
100 #define rt_intr_flags(x) splget(x)
106 #ifdef CONFIG_XENO_OPT_NATIVE_INTR
108 int __native_intr_pkg_init(
void);
110 void __native_intr_pkg_cleanup(
void);
112 static inline void __native_intr_flush_rq(xnqueue_t *rq)
114 xeno_flush_rq(RT_INTR, rq, intr);
119 #define __native_intr_pkg_init() ({ 0; })
120 #define __native_intr_pkg_cleanup() do { } while(0)
121 #define __native_intr_flush_rq(rq) do { } while(0)
132 #ifdef CONFIG_XENO_OPT_PERVASIVE
133 int rt_intr_handler(xnintr_t *cookie);
142 typedef RT_INTR_PLACEHOLDER RT_INTR;
155 intr->opaque = XN_NO_HANDLE;
int rt_intr_inquire(RT_INTR *intr, RT_INTR_INFO *info)
Inquire about an interrupt object.
Definition: intr.c:68
static int rt_intr_unbind(RT_INTR *intr)
Unbind from an interrupt object.
Definition: intr.h:152
int rt_intr_bind(RT_INTR *intr, const char *name, RTIME timeout)
Bind to an interrupt object.
Definition: intr.c:33
int rt_intr_enable(RT_INTR *intr)
Enable an interrupt object.
Definition: intr.c:58
int rt_intr_delete(RT_INTR *intr)
Delete an interrupt object.
Definition: intr.c:39
This file is part of the Xenomai project.
int rt_intr_create(RT_INTR *intr, const char *name, unsigned irq, int mode)
Create an interrupt object from user-space.
Definition: intr.c:27
int rt_intr_wait(RT_INTR *intr, RTIME timeout)
Wait for the next interrupt.
Definition: intr.c:44
This file is part of the Xenomai project.
int rt_intr_disable(RT_INTR *intr)
Disable an interrupt object.
Definition: intr.c:63