rtai-core/include/xenomai/fusion.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 it
00005  * under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (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 Foundation,
00016  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  *
00018  * As a special exception, the RTAI project gives permission
00019  * for additional uses of the text contained in its release of
00020  * Xenomai.
00021  *
00022  * The exception is that, if you link the Xenomai libraries with other
00023  * files to produce an executable, this does not by itself cause the
00024  * resulting executable to be covered by the GNU General Public License.
00025  * Your use of that executable is in no way restricted on account of
00026  * linking the Xenomai libraries code into it.
00027  *
00028  * This exception does not however invalidate any other reasons why
00029  * the executable file might be covered by the GNU General Public
00030  * License.
00031  *
00032  * This exception applies only to the code released by the
00033  * RTAI project under the name Xenomai.  If you copy code from other
00034  * RTAI project releases into a copy of Xenomai, as the General Public
00035  * License permits, the exception does not apply to the code that you
00036  * add in this way.  To avoid misleading anyone as to the status of
00037  * such modified files, you must delete this exception notice from
00038  * them.
00039  *
00040  * If you write modifications of your own for Xenomai, it is your
00041  * choice whether to permit this exception to apply to your
00042  * modifications. If you do not wish that, delete this exception
00043  * notice.
00044  */
00045 
00046 #ifndef _xenomai_fusion_h
00047 #define _xenomai_fusion_h
00048 
00049 #include <asm/rtai_xncall.h>
00050 
00051 #define FUSION_SKIN_MAGIC      0x504f5358
00052 
00053 #define __xn_fusion_init     0
00054 #define __xn_fusion_create   1
00055 #define __xn_fusion_start    2
00056 #define __xn_fusion_migrate  3
00057 #define __xn_fusion_time     4
00058 #define __xn_fusion_inquire  5
00059 #define __xn_fusion_idle     6
00060 #define __xn_fusion_cancel   7
00061 #define __xn_fusion_activate 8
00062 #define __xn_fusion_hold     9
00063 #define __xn_fusion_release  10
00064 
00065 #define FUSION_RTAI_DOMAIN   0
00066 #define FUSION_LINUX_DOMAIN  1
00067 
00068 #define FUSION_LOW_PRI       1  /* We (must) conform to the standard POSIX */
00069 #define FUSION_HIGH_PRI      99 /* RT priority range used by Linux. */
00070 
00071 #ifdef __cplusplus
00072 extern "C" {
00073 #endif /* __cplusplus */
00074 
00075 #ifndef __KERNEL__
00076 
00077 #include <sys/types.h>
00078 #include <pthread.h>
00079 
00080     /* Public RTAI/fusion interface. */
00081 
00082 int pthread_info_rt(xnsysinfo_t *infop);
00083 
00084 int pthread_init_rt(const char *name,
00085                     void *uhandle,
00086                     void **khandlep);
00087 
00088 int pthread_create_rt(const char *name,
00089                       void *uhandle,
00090                       pid_t syncpid,
00091                       int *syncp,
00092                       void **khandlep);
00093 
00094 int pthread_start_rt(void *khandle);
00095 
00096 int pthread_sync_rt(int *syncp);
00097 
00098 int pthread_migrate_rt(int domain);
00099 
00100 int pthread_time_rt(unsigned long long *tp);
00101 
00102 int pthread_inquire_rt(xninquiry_t *infop);
00103 
00104     /* The following routines are private to the RTAI/vm control layer
00105        based on the RTAI/fusion interface. Do not use them in
00106        applications. */
00107 
00108 int __pthread_idle_vm(int *lockp);
00109 
00110 int __pthread_cancel_vm(void *deadhandle,
00111                         void *nexthandle);
00112 
00113 int __pthread_activate_vm(void *nexthandle,
00114                           void *prevhandle);
00115 
00116 int __pthread_hold_vm(int *pendp);
00117 
00118 int __pthread_release_vm(int *lockp);
00119 
00120 #endif /* !__KERNEL__ */
00121 
00122 #ifdef __cplusplus
00123 };
00124 #endif /* __cplusplus */
00125 
00126 #endif /* !_xenomai_fusion_h */

Generated on Sat Jul 24 19:36:04 2004 for RTAI API by doxygen 1.3.4