ksrc/skins/posix/intr.h

00001 /*
00002  * This program is free software; you can redistribute it and/or
00003  * modify it under the terms of the GNU General Public License as
00004  * published by the Free Software Foundation; either version 2 of the
00005  * License, or (at your option) any later version.
00006  *
00007  * This program is distributed in the hope that it will be useful,
00008  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010  * GNU General Public License for more details.
00011  *
00012  * You should have received a copy of the GNU General Public License
00013  * along with this program; if not, write to the Free Software
00014  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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;   /* !< Magic code - must be first */
00031 
00032     xnintr_t intr_base; /* !< Base interrupt object. */
00033 
00034     xnholder_t link;    /* !< Link in pse51_intrq */
00035 
00036 #define link2intr(ln) container_of(ln, struct pse51_interrupt, link)
00037 
00038 #if defined(__KERNEL__) && defined(CONFIG_XENO_OPT_PERVASIVE)
00039 
00040     int mode;           /* !< Interrupt control mode. */
00041 
00042     int pending;        /* !< Pending hits to process. */
00043 
00044     xnsynch_t synch_base; /* !< Base synchronization object. */
00045 
00046 #endif /* __KERNEL__ && CONFIG_XENO_OPT_PERVASIVE */
00047 };
00048 
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052 
00053 void pse51_intrq_cleanup(pse51_kqueues_t *q);
00054 
00055 void pse51_intr_pkg_init(void);
00056 
00057 void pse51_intr_pkg_cleanup(void);
00058 
00059 #ifdef __cplusplus
00060 }
00061 #endif
00062 
00063 #endif /* __KERNEL__ || __XENO_SIM__ */
00064 
00065 #endif /* !_POSIX_INTR_H */

Generated on Sun Dec 9 10:37:17 2007 for Xenomai API by  doxygen 1.5.3