• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

include/nucleus/shadow.h

00001 /*
00002  * Copyright (C) 2001,2002,2003 Philippe Gerum <rpm@xenomai.org>.
00003  *
00004  * Xenomai is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published
00006  * by the Free Software Foundation; either version 2 of the License,
00007  * or (at your option) any later version.
00008  *
00009  * Xenomai is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with Xenomai; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00017  * 02111-1307, USA.
00018  */
00019 
00020 #ifndef _XENO_NUCLEUS_SHADOW_H
00021 #define _XENO_NUCLEUS_SHADOW_H
00022 
00023 #include <asm/xenomai/atomic.h>
00024 
00025 #ifdef CONFIG_XENO_OPT_PERVASIVE
00026 
00027 #include <asm/xenomai/syscall.h>
00028 
00029 #define XENOMAI_MUX_NR 16
00030 
00031 /* Events sent to the interface callback */
00032 #define XNSHADOW_CLIENT_ATTACH  0
00033 #define XNSHADOW_CLIENT_DETACH  1
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 struct xnthread;
00040 struct xnmutex;
00041 struct pt_regs;
00042 struct timespec;
00043 struct timeval;
00044 struct xntbase;
00045 
00046 struct xnskin_props {
00047         const char *name;
00048         unsigned magic;
00049         int nrcalls;
00050         void *(*eventcb)(int, void *);
00051         xnsysent_t *systab;
00052         struct xntbase **timebasep;
00053         struct module *module;
00054 };
00055 
00056 int xnshadow_mount(void);
00057 
00058 void xnshadow_cleanup(void);
00059 
00060 void xnshadow_grab_events(void);
00061 
00062 void xnshadow_release_events(void);
00063 
00064 int xnshadow_map(struct xnthread *thread,
00065                  xncompletion_t __user *u_completion,
00066                  unsigned long __user *u_mode_offset);
00067 
00068 void xnshadow_unmap(struct xnthread *thread);
00069 
00070 int xnshadow_harden(void);
00071 
00072 void xnshadow_relax(int notify, int reason);
00073 
00074 void xnshadow_renice(struct xnthread *thread);
00075 
00076 void xnshadow_suspend(struct xnthread *thread);
00077 
00078 int xnshadow_wait_barrier(struct pt_regs *regs);
00079 
00080 void xnshadow_start(struct xnthread *thread);
00081 
00082 void xnshadow_signal_completion(xncompletion_t __user *u_completion,
00083                                 int err);
00084 
00085 void xnshadow_exit(void);
00086 
00087 int xnshadow_register_interface(struct xnskin_props *props);
00088 
00089 int xnshadow_unregister_interface(int muxid);
00090 
00091 void xnshadow_reset_shield(void);
00092 
00093 void xnshadow_send_sig(struct xnthread *thread,
00094                        int sig,
00095                        int arg,
00096                        int specific);
00097 
00098 void xnshadow_rpi_check(void);
00099 
00100 #ifdef RTHAL_HAVE_RETURN_EVENT
00101 #define XNARCH_HAVE_MAYDAY  1
00102 void xnshadow_call_mayday(struct xnthread *thread, int sigtype);
00103 #else
00104 static inline void xnshadow_call_mayday(struct xnthread *thread,
00105                                         int sigtype)
00106 {
00107         /* no luck, I-pipe too old. Nobody hears you screaming... */
00108 }
00109 #endif
00110 
00111 #ifdef __cplusplus
00112 }
00113 #endif
00114 
00115 #endif /* CONFIG_XENO_OPT_PERVASIVE */
00116 
00117 #if defined(CONFIG_XENO_OPT_PERVASIVE) && defined(CONFIG_XENO_OPT_VFILE)
00118 void xnshadow_init_proc(void);
00119 void xnshadow_cleanup_proc(void);
00120 #else
00121 static inline void xnshadow_init_proc(void) { }
00122 static inline void xnshadow_cleanup_proc(void) { }
00123 #endif /* CONFIG_XENO_OPT_PERVASIVE && CONFIG_XENO_OPT_VFILE */
00124 
00125 #endif /* !_XENO_NUCLEUS_SHADOW_H */

Generated on Wed Nov 2 2011 18:01:06 for Xenomai API by  doxygen 1.7.1