00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _POSIX_INTR_H
00019 #define _POSIX_INTR_H
00020
00021 #include <nucleus/synch.h>
00022 #include <nucleus/intr.h>
00023
00024 #if defined(__KERNEL__) || defined(__XENO_SIM__)
00025
00026 #define PTHREAD_IDESC(xintr) ((struct pse51_interrupt *)(xintr)->cookie)
00027
00028 struct pse51_interrupt {
00029
00030 unsigned magic;
00031
00032 xnintr_t intr_base;
00033
00034 xnholder_t link;
00035
00036 #define link2intr(laddr) \
00037 ((struct pse51_interrupt *)(((char *)laddr) - (int)(&((struct pse51_interrupt *)0)->link)))
00038
00039 #if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_PERVASIVE)
00040
00041 int mode;
00042
00043 int pending;
00044
00045 xnsynch_t synch_base;
00046
00047 #endif
00048 };
00049
00050 #ifdef __cplusplus
00051 extern "C" {
00052 #endif
00053
00054 void pse51_intrq_cleanup(pse51_kqueues_t *q);
00055
00056 void pse51_intr_pkg_init(void);
00057
00058 void pse51_intr_pkg_cleanup(void);
00059
00060 #ifdef __cplusplus
00061 }
00062 #endif
00063
00064 #endif
00065
00066 #endif