rtai_shm.h

来自「rtai-3.1-test3的源代码(Real-Time Application」· C头文件 代码 · 共 59 行

H
59
字号
/*COPYRIGHT (C) 2000  Paolo Mantegazza (mantegazza@aero.polimi.it)Port to ARM Copyright (c) 2001 Alex Z黳ke, SYSGO RTS GmbH (azu@sysgo.de)This library is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2 of the License, or (at your option) any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.*/#ifndef RTAI_SHM_ASM_H#define RTAI_SHM_ASM_H#undef __SHM_USE_VECTOR // until we implement it for arm...#define RTAI_SHM_VECTOR      0xFD#ifndef __KERNEL__#define RTAI_SRQ_MAGIC	"0x404404"#ifdef __SHM_USE_VECTORstatic inline long long rtai_shmrq(unsigned long srq, unsigned long whatever){	long long retval;	register unsigned long __sc_0 __asm__ ("r0") = srq | (RTAI_SHM_VECTOR << 24);	register unsigned long __sc_1 __asm__ ("r1") = whatever;	__asm__ __volatile__ (	"swi\t" RTAI_SRQ_MAGIC "\n\t"		: "=&r" (__sc_0), "=&r" (__sc_1)		: "0" (__sc_0), "1" (__sc_1)		: "r0", "r1");	((unsigned long *)&retval)[0] = __sc_0;	((unsigned long *)&retval)[1] = __sc_1;	return retval;}#endif#else#define RTAI_SHM_HANDLER shm_handler#define DEFINE_SHM_HANDLER#endif #endif 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?