Blame arch/nt32/syscall_arch.h

296178
extern unsigned long ** __syscall_vtbl;
4df078
extern long __syscall_alert(long);
296178
296178
typedef long __syscall0_fn(void);
296178
typedef long __syscall1_fn(long a1);
296178
typedef long __syscall2_fn(long a1, long a2);
296178
typedef long __syscall3_fn(long a1, long a2, long a3);
296178
typedef long __syscall4_fn(long a1, long a2, long a3, long a4);
296178
typedef long __syscall5_fn(long a1, long a2, long a3, long a4, long a5);
296178
typedef long __syscall6_fn(long a1, long a2, long a3, long a4, long a5, long a6);
296178
296178
#define sysfn_from_fn(x) \
296178
	x * sysfn = (x *)__syscall_vtbl[n]
296178
296178
static __inline long __syscall0(long n)
296178
{
296178
	sysfn_from_fn(__syscall0_fn);
4df078
	return sysfn ? sysfn() : __syscall_alert(n);
296178
}
296178
296178
static __inline long __syscall1(long n, long a1)
296178
{
296178
	sysfn_from_fn(__syscall1_fn);
4df078
	return sysfn ? sysfn(a1) : __syscall_alert(n);
296178
}
296178
296178
static __inline long __syscall2(long n, long a1, long a2)
296178
{
0b7880
	sysfn_from_fn(__syscall3_fn);
0b7880
	return sysfn ? sysfn(a1, a2, 0) : __syscall_alert(n);
296178
}
296178
296178
static __inline long __syscall3(long n, long a1, long a2, long a3)
296178
{
0b7880
	sysfn_from_fn(__syscall4_fn);
0b7880
	return sysfn ? sysfn(a1, a2, a3, 0) : __syscall_alert(n);
296178
}
296178
296178
static __inline long __syscall4(long n, long a1, long a2, long a3, long a4)
296178
{
296178
	sysfn_from_fn(__syscall4_fn);
4df078
	return sysfn ? sysfn(a1, a2, a3, a4) : __syscall_alert(n);
296178
}
296178
296178
static __inline long __syscall5(long n, long a1, long a2, long a3, long a4, long a5)
296178
{
296178
	sysfn_from_fn(__syscall5_fn);
4df078
	return sysfn ? sysfn(a1, a2, a3, a4, a5) : __syscall_alert(n);
296178
}
296178
296178
static __inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6)
296178
{
296178
	sysfn_from_fn(__syscall6_fn);
4df078
	return sysfn ? sysfn(a1, a2, a3, a4, a5, a6) : __syscall_alert(n);
296178
}
296178
296178
296178
#define __SYSCALL_LL_E(x) (x)
296178
#define __SYSCALL_LL_O(x) (x)