Hello. I know that this is a tad off topic but I am hoping someone can
enlighten me on how to do this. I need to create a system call on a x86
one call requires 7 args, the other 8, and one 9.
I realize my problem could be avoided by using a data structure but in
order to be compatible with the API I am implementing it must use the
exact same number of args.
I have no problem implementing syscalls w/ Linux, but I have no idea how
to implment more a syscall with more than 5 args.
For example the 5 arg syscall is like such:
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
type5,arg5) \
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
{ \
long __res; \
__asm__ volatile ("int $0x80" \
: "=a" (__res) \
: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \
"d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
__syscall_return(type,__res); \
}
How would I do this for 7, 8, and 9 arguments.
Any code, hints and ideas much appreciated. Thanks.
Jay Schulist
[EMAIL PROTECTED]