22 #ifndef _XENO_NUCLEUS_INTR_H
23 #define _XENO_NUCLEUS_INTR_H
26 #define XN_ISR_NONE 0x1
27 #define XN_ISR_HANDLED 0x2
29 #define XN_ISR_PROPAGATE 0x100
30 #define XN_ISR_NOENABLE 0x200
31 #define XN_ISR_BITMASK (~0xff)
34 #define XN_ISR_SHARED 0x1
35 #define XN_ISR_EDGE 0x2
38 #define XN_ISR_ATTACHED 0x10000
40 #if defined(__KERNEL__) || defined(__XENO_SIM__)
42 #include <nucleus/types.h>
43 #include <nucleus/stat.h>
47 typedef struct xnintr {
49 #ifdef CONFIG_XENO_OPT_SHIRQ
68 xnstat_counter_t hits;
69 xnstat_exectime_t account;
70 xnstat_exectime_t sum;
71 } stat[XNARCH_NR_CPUS];
75 typedef struct xnintr_iterator {
81 xnticks_t exectime_period;
83 xnticks_t account_period;
85 xnticks_t exectime_total;
93 extern xnintr_t nkclock;
99 int xnintr_mount(
void);
101 void xnintr_clock_handler(
void);
103 void xnintr_host_tick(
struct xnsched *sched);
105 void xnintr_init_proc(
void);
107 void xnintr_cleanup_proc(
void);
130 xnarch_cpumask_t cpumask);
132 int xnintr_query_init(xnintr_iterator_t *iterator);
134 int xnintr_query_next(
int irq, xnintr_iterator_t *iterator,
int xnintr_enable(xnintr_t *intr)
Enable an interrupt object.
Definition: intr.c:833
Scheduling information structure.
Definition: sched.h:66
int xnintr_init(xnintr_t *intr, const char *name, unsigned irq, xnisr_t isr, xniack_t iack, xnflags_t flags)
Initialize an interrupt object.
Definition: intr.c:620
int xnintr_disable(xnintr_t *intr)
Disable an interrupt object.
Definition: intr.c:865
int xnintr_attach(xnintr_t *intr, void *cookie)
Attach an interrupt object.
Definition: intr.c:714
int xnintr_detach(xnintr_t *intr)
Detach an interrupt object.
Definition: intr.c:780
int xnintr_destroy(xnintr_t *intr)
Destroy an interrupt object.
Definition: intr.c:669
void xnintr_affinity(xnintr_t *intr, xnarch_cpumask_t cpumask)
Set interrupt's processor affinity.
Definition: intr.c:892