00001 /* 00002 * Support for System Requests (SRQs). 00003 * 00004 * Original RTAI/x86 layer implementation: 00005 * Copyright (c) 2000 Paolo Mantegazza (mantegazza@aero.polimi.it) 00006 * Copyright (c) 2000 Steve Papacharalambous (stevep@zentropix.com) 00007 * Copyright (c) 2000 Stuart Hughes 00008 * and others. 00009 * 00010 * RTAI/x86 rewrite over Adeos: 00011 * Copyright (c) 2002 Philippe Gerum (rpm@xenomai.org) 00012 * 00013 * Original RTAI/ARM RTHAL implementation: 00014 * Copyright (c) 2000 Pierre Cloutier (pcloutier@poseidoncontrols.com) 00015 * Copyright (c) 2001 Alex Züpke, SYSGO RTS GmbH (azu@sysgo.de) 00016 * Copyright (c) 2002 Guennadi Liakhovetski DSA GmbH (gl@dsa-ac.de) 00017 * Copyright (c) 2002 Steve Papacharalambous (stevep@zentropix.com) 00018 * Copyright (c) 2002 Wolfgang Müller (wolfgang.mueller@dsa-ac.de) 00019 * Copyright (c) 2003 Bernard Haible, Marconi Communications 00020 * Copyright (c) 2003 Thomas Gleixner (tglx@linutronix.de) 00021 * Copyright (c) 2003 Philippe Gerum (rpm@xenomai.org) 00022 * 00023 * RTAI/ARM over Adeos rewrite: 00024 * Copyright (c) 2004-2005 Michael Neuhauser, Firmix Software GmbH (mike@firmix.at) 00025 * 00026 * 00027 * This program is free software; you can redistribute it and/or modify it under 00028 * the terms of the GNU General Public License as published by the Free Software 00029 * Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, USA; either version 2 of 00030 * the License, or (at your option) any later version. 00031 * 00032 * This program is distributed in the hope that it will be useful, but WITHOUT 00033 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00034 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 00035 * details. 00036 * 00037 * You should have received a copy of the GNU General Public License along with 00038 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00039 * Place - Suite 330, Boston, MA 02111-1307, USA. 00040 */ 00041 #ifndef _RTAI_ASM_ARM_SRQ_H 00042 #define _RTAI_ASM_ARM_SRQ_H 00043 00044 #ifdef CONFIG_RTAI_LXRT_USE_LINUX_SYSCALL 00045 #define USE_LINUX_SYSCALL 00046 #include <unistd.h> 00047 #else 00048 #undef USE_LINUX_SYSCALL 00049 #include <asm/rtai_vectors.h> 00050 #endif 00051 00052 #define RTAI_SRQ_SYSCALL_NR 0x70000000 00053 00054 static inline long long rtai_srq(long srq, unsigned long args) 00055 { 00056 long long retval; 00057 #ifdef USE_LINUX_SYSCALL 00058 syscall(RTAI_SRQ_SYSCALL_NR, srq, args, &retval); 00059 #else 00060 #warning "RTAI_DO_SWI is not working yet. Please configure RTAI with --enable-lxrt-use-linux-syscall." 00061 retval = RTAI_DO_SWI(RTAI_SYS_VECTOR, (srq), (args)); 00062 #endif 00063 return retval; 00064 } 00065 00066 static inline int rtai_open_srq(unsigned int label) 00067 { 00068 return (int)rtai_srq(0, label); 00069 } 00070 00071 #endif /* _RTAI_ASM_ARM_SRQ_H */