From b9f9f699372fae9f3b7926fa165d07fe68a949fb Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 23 Apr 2002 21:33:41 +0000 Subject: 2002-04-23 Jeff Johnston * libc/include/machine/types.h (__pid_t, __off_t, __loff_t): Added. * libc/sys/linux/Makefile.am: Add support for mmap.c. * libc/sys/linux/Makefile.in: Regenerated. * libc/sys/linux/mmap.c: New file. * libc/sys/linux/machine/i386/syscall.h: Add _syscall6 macro. * libc/sys/linux/sys/types.h (pid_t, off_t, loff_t): Added. --- newlib/libc/sys/linux/machine/i386/syscall.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'newlib/libc/sys/linux/machine') diff --git a/newlib/libc/sys/linux/machine/i386/syscall.h b/newlib/libc/sys/linux/machine/i386/syscall.h index 08802e52e..c8f265f68 100644 --- a/newlib/libc/sys/linux/machine/i386/syscall.h +++ b/newlib/libc/sys/linux/machine/i386/syscall.h @@ -55,6 +55,12 @@ __asm__ volatile ("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx" \ : "0" (__NR_##name),"m" ((long)(arg1)),"c" ((long)(arg2)), \ "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); +#undef __inline_syscall6 +#define __inline_syscall6(name,ret,arg1,arg2,arg3,arg4,arg5,arg6) \ +__asm__ volatile ("push %%ebx; lea 8(%%ebp),%%ebx; int $0x80; pop %%ebx" \ + : "=a" (ret) \ + : "0" (__NR_##name)); + #undef _syscall1 #define _syscall1(type,name,type1,arg1) \ type name(type1 arg1) \ @@ -102,6 +108,14 @@ __syscall_return(type,__res); \ } #undef _syscall6 +#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ + type5,arg5,type6,arg6) \ +type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ +{ \ +long __res; \ +__inline_syscall6(name,__res,arg1,arg2,arg3,arg4,arg5,arg6) \ +__syscall_return(type,__res); \ +} #endif /* __PIC__ && __i386__ */ -- cgit v1.2.3