diff --git a/include/ardix/syscall.h b/include/ardix/syscall.h index 53e28e4..8ed975a 100644 --- a/include/ardix/syscall.h +++ b/include/ardix/syscall.h @@ -17,8 +17,7 @@ enum syscall { }; /** Perform an indirect system call. */ -int syscall(enum syscall number, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, - sysarg_t arg4, sysarg_t arg5, sysarg_t arg6); +int syscall(enum syscall number, ...); /** The table of system call handlers, indexed by syscall number. */ extern const int (*sys_table[NSYSCALLS])(sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, diff --git a/lib/unistd.c b/lib/unistd.c index 0c840c8..b55e4e1 100644 --- a/lib/unistd.c +++ b/lib/unistd.c @@ -10,12 +10,12 @@ __shared ssize_t read(int fildes, void *buf, size_t nbyte) { - return syscall(SYSCALL_READ, (sysarg_t)fildes, (sysarg_t)buf, (sysarg_t)nbyte, 0, 0, 0); + return syscall(SYSCALL_READ, (sysarg_t)fildes, (sysarg_t)buf, (sysarg_t)nbyte); } __shared ssize_t write(int fildes, const void *buf, size_t nbyte) { - return syscall(SYSCALL_WRITE, (sysarg_t)fildes, (sysarg_t)buf, (sysarg_t)nbyte, 0, 0, 0); + return syscall(SYSCALL_WRITE, (sysarg_t)fildes, (sysarg_t)buf, (sysarg_t)nbyte); } /*