syscall: use vararg declaration

This commit is contained in:
anna 2021-02-17 14:30:24 +01:00
parent a658a7c8b3
commit b8c4593fc5
Signed by: fef
GPG key ID: EC22E476DC2D3D84
2 changed files with 3 additions and 4 deletions

View file

@ -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,

View file

@ -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);
}
/*