Xenomai API  2.5.6.1
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 #ifdef 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 /* CONFIG_XENO_OPT_PERVASIVE */
00047     pse51_kqueues_t *owningq;
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 /* __KERNEL__ || __XENO_SIM__ */
00065 
00066 #endif /* !_POSIX_INTR_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines