syscall: use vararg declaration
This commit is contained in:
parent
a658a7c8b3
commit
b8c4593fc5
2 changed files with 3 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue