00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _RTAI_NUCLEUS_INTR_H
00021 #define _RTAI_NUCLEUS_INTR_H
00022
00023 #include <nucleus/types.h>
00024
00025 #define XN_ISR_HANDLED 0x0
00026 #define XN_ISR_CHAINED 0x1
00027 #define XN_ISR_ENABLE 0x2
00028
00029 #if defined(__KERNEL__) || defined(__RTAI_UVM__) || defined(__RTAI_SIM__)
00030
00031 struct xnintr;
00032
00033 typedef struct xnintr {
00034
00035 unsigned irq;
00036
00037 xnisr_t isr;
00038
00039 unsigned long hits;
00040
00041 void *cookie;
00042
00043 } xnintr_t;
00044
00045 extern xnintr_t nkclock;
00046
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif
00050
00051 void xnintr_clock_handler(void);
00052
00053
00054
00055 int xnintr_init(xnintr_t *intr,
00056 unsigned irq,
00057 xnisr_t isr,
00058 xnflags_t flags);
00059
00060 int xnintr_destroy(xnintr_t *intr);
00061
00062 int xnintr_attach(xnintr_t *intr,
00063 void *cookie);
00064
00065 int xnintr_detach(xnintr_t *intr);
00066
00067 int xnintr_enable(xnintr_t *intr);
00068
00069 int xnintr_disable(xnintr_t *intr);
00070
00071 xnarch_cpumask_t xnintr_affinity(xnintr_t *intr,
00072 xnarch_cpumask_t cpumask);
00073
00074 #ifdef __cplusplus
00075 }
00076 #endif
00077
00078 #endif
00079
00080 #endif