Re: [PATCH 6/7] remove all remaining _syscallX macros

From: Arnd Bergmann
Date: Mon Aug 28 2006 - 03:38:44 EST


On Monday 28 August 2006 09:35, Andi Kleen wrote:
> I would prefer to keep them on i386/x86-64 at least because
> a lot of my test programs are using them.
>
Hmm, maybe we should have an asm-generic/unistd.h then
containing something like

#ifndef __KERNEL__
#include <sys/syscall.h>
#define _syscall0(type,name) \
type name(type1 arg1) \
{ \
return syscall(__NR_ ## name); \
}
#define _syscall1(type,name,type1,arg1) \
type name(type1 arg1) \
{ \
return syscall(__NR_ ## name, arg1); \
}
#define _syscall1(type,name,type1,arg1,type2,arg2) \
type name(type1 arg1, type2 arg2) \
{ \
return syscall(__NR_ ## name, arg1, arg2); \
}
// ...
#endif

Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/