update for new syscall args description mechanism

This commit is contained in:
cgd 1994-10-20 04:28:10 +00:00
parent fa90479d67
commit 6f353db960
9 changed files with 1072 additions and 111 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_syscalls.c,v 1.12 1994/08/17 14:43:56 mycroft Exp $ */
/* $NetBSD: nfs_syscalls.c,v 1.13 1994/10/20 04:28:10 cgd Exp $ */
/*
* Copyright (c) 1989, 1993
@ -57,6 +57,8 @@
#include <sys/namei.h>
#include <sys/syslog.h>
#include <sys/syscallargs.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#ifdef ISO
@ -102,14 +104,13 @@ static int nfs_asyncdaemon[NFS_MAXASYNCDAEMON];
/*
* Get file handle system call
*/
struct getfh_args {
char *fname;
fhandle_t *fhp;
};
getfh(p, uap, retval)
struct proc *p;
register struct getfh_args *uap;
int *retval;
register struct getfh_args /* {
syscallarg(char *) fname;
syscallarg(fhandle_t *) fhp;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
fhandle_t fh;
@ -121,7 +122,8 @@ getfh(p, uap, retval)
*/
if (error = suser(p->p_ucred, &p->p_acflag))
return (error);
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->fname, p);
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
SCARG(uap, fname), p);
if (error = namei(&nd))
return (error);
vp = nd.ni_vp;
@ -131,7 +133,7 @@ getfh(p, uap, retval)
vput(vp);
if (error)
return (error);
error = copyout((caddr_t)&fh, (caddr_t)uap->fhp, sizeof (fh));
error = copyout((caddr_t)&fh, (caddr_t)SCARG(uap, fhp), sizeof (fh));
return (error);
}
@ -142,14 +144,13 @@ getfh(p, uap, retval)
* - remains in the kernel as an nfsd
* - remains in the kernel as an nfsiod
*/
struct nfssvc_args {
int flag;
caddr_t argp;
};
nfssvc(p, uap, retval)
struct proc *p;
register struct nfssvc_args *uap;
int *retval;
register struct nfssvc_args /* {
syscallarg(int) flag;
syscallarg(caddr_t) argp;
} */ *uap;
register_t *retval;
{
struct nameidata nd;
struct file *fp;
@ -172,17 +173,18 @@ nfssvc(p, uap, retval)
nfssvc_sockhead_flag |= SLP_WANTINIT;
(void) tsleep((caddr_t)&nfssvc_sockhead, PSOCK, "nfsd init", 0);
}
if (uap->flag & NFSSVC_BIOD) {
if (SCARG(uap, flag) & NFSSVC_BIOD) {
#ifndef NFSCLIENT
error = ENOSYS;
#else /* !NFSCLIENT */
error = nfssvc_iod(p);
#endif /* !NFSCLIENT */
} else if (uap->flag & NFSSVC_MNTD) {
} else if (SCARG(uap, flag) & NFSSVC_MNTD) {
#ifndef NFSCLIENT
error = ENOSYS;
#else /* !NFSCLIENT */
if (error = copyin(uap->argp, (caddr_t)&ncd, sizeof (ncd)))
if (error =
copyin(SCARG(uap, argp), (caddr_t)&ncd, sizeof (ncd)))
return (error);
NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
ncd.ncd_dirp, p);
@ -195,17 +197,17 @@ nfssvc(p, uap, retval)
if (error)
return (error);
if ((nmp->nm_flag & NFSMNT_MNTD) &&
(uap->flag & NFSSVC_GOTAUTH) == 0)
(SCARG(uap, flag) & NFSSVC_GOTAUTH) == 0)
return (0);
nmp->nm_flag |= NFSMNT_MNTD;
error = nqnfs_clientd(nmp, p->p_ucred, &ncd, uap->flag,
uap->argp, p);
error = nqnfs_clientd(nmp, p->p_ucred, &ncd, SCARG(uap, flag),
SCARG(uap, argp), p);
#endif /* !NFSCLIENT */
} else if (uap->flag & NFSSVC_ADDSOCK) {
} else if (SCARG(uap, flag) & NFSSVC_ADDSOCK) {
#ifndef NFSSERVER
error = ENOSYS;
#else /* !NFSSERVER */
if (error = copyin(uap->argp, (caddr_t)&nfsdarg,
if (error = copyin(SCARG(uap, argp), (caddr_t)&nfsdarg,
sizeof(nfsdarg)))
return (error);
if (error = getsock(p->p_fd, nfsdarg.sock, &fp))
@ -224,10 +226,12 @@ nfssvc(p, uap, retval)
#ifndef NFSSERVER
error = ENOSYS;
#else /* !NFSSERVER */
if (error = copyin(uap->argp, (caddr_t)nsd, sizeof (*nsd)))
if (error = copyin(SCARG(uap, argp), (caddr_t)nsd,
sizeof (*nsd)))
return (error);
if ((uap->flag & NFSSVC_AUTHIN) && (nfsd = nsd->nsd_nfsd) &&
(nfsd->nd_slp->ns_flag & SLP_VALID)) {
if ((SCARG(uap, flag) & NFSSVC_AUTHIN) &&
(nfsd = nsd->nsd_nfsd) &&
(nfsd->nd_slp->ns_flag & SLP_VALID)) {
slp = nfsd->nd_slp;
/*
@ -272,9 +276,10 @@ nfssvc(p, uap, retval)
}
}
}
if ((uap->flag & NFSSVC_AUTHINFAIL) && (nfsd = nsd->nsd_nfsd))
if ((SCARG(uap, flag) & NFSSVC_AUTHINFAIL) &&
(nfsd = nsd->nsd_nfsd))
nfsd->nd_flag |= NFSD_AUTHFAIL;
error = nfssvc_nfsd(nsd, uap->argp, p);
error = nfssvc_nfsd(nsd, SCARG(uap, argp), p);
#endif /* !NFSSERVER */
}
if (error == EINTR || error == ERESTART)

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_vnops.c,v 1.40 1994/08/30 19:42:22 pk Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.41 1994/10/20 04:28:13 cgd Exp $ */
/*
* Copyright (c) 1989, 1993
@ -2231,7 +2231,7 @@ nfs_pathconf(ap)
struct vop_pathconf_args /* {
struct vnode *a_vp;
int a_name;
int *a_retval;
register_t *a_retval;
} */ *ap;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: msg.h,v 1.4 1994/06/29 06:44:43 cgd Exp $ */
/* $NetBSD: msg.h,v 1.5 1994/10/20 04:28:58 cgd Exp $ */
/*
* SVID compatible msg.h file
@ -149,7 +149,6 @@ struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */
#include <sys/cdefs.h>
__BEGIN_DECLS
int msgsys __P((int, ...));
int msgctl __P((int, int, struct msqid_ds *));
int msgget __P((key_t, int));
int msgsnd __P((int, void *, size_t, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $ */
/* $NetBSD: sem.h,v 1.6 1994/10/20 04:29:00 cgd Exp $ */
/*
* SVID compatible sem.h file
@ -158,20 +158,19 @@ int *semu; /* undo structure pool */
/*
* Parameters to the semconfig system call
*/
typedef enum {
SEM_CONFIG_FREEZE, /* Freeze the semaphore facility. */
SEM_CONFIG_THAW /* Thaw the semaphore facility. */
} semconfig_ctl_t;
#define SEM_CONFIG_FREEZE 0 /* Freeze the semaphore facility. */
#define SEM_CONFIG_THAW 1 /* Thaw the semaphore facility. */
#endif /* KERNEL */
#ifndef KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
int semsys __P((int, ...));
int semctl __P((int, int, int, union semun));
int __semctl __P((int, int, int, union semun *));
int semget __P((key_t, int, int));
int semop __P((int, struct sembuf *,unsigned));
int semop __P((int, struct sembuf *, u_int));
int semconfig __P((int));
__END_DECLS
#endif /* !KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */
/* $NetBSD: shm.h,v 1.16 1994/10/20 04:29:01 cgd Exp $ */
/*
* Copyright (c) 1994 Adam Glass
@ -77,11 +77,10 @@ struct shmid_ds *shmsegs;
#include <sys/cdefs.h>
__BEGIN_DECLS
int shmsys __P((int, ...));
void *shmat __P((int, void *, int));
int shmget __P((key_t, int, int));
int shmctl __P((int, int, struct shmid_ds *));
int shmdt __P((void *));
int shmget __P((key_t, int, int));
__END_DECLS
#endif /* !KERNEL */

View File

@ -2,7 +2,7 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from: NetBSD syscalls.master,v 1.22 1994/06/29 06:33:10
* created from NetBSD: syscalls.master,v 1.22 1994/06/29 06:33:10 cgd Exp
*/
#define SYS_syscall 0
@ -13,7 +13,7 @@
#define SYS_open 5
#define SYS_close 6
#define SYS_wait4 7
/* 8 is old creat */
/* 8 is compat_43 creat */
#define SYS_link 9
#define SYS_unlink 10
/* 11 is obsolete execv */
@ -24,7 +24,7 @@
#define SYS_chown 16
#define SYS_break 17
#define SYS_getfsstat 18
/* 19 is old lseek */
/* 19 is compat_43 lseek */
#define SYS_getpid 20
#define SYS_mount 21
#define SYS_unmount 22
@ -43,9 +43,9 @@
#define SYS_fchflags 35
#define SYS_sync 36
#define SYS_kill 37
/* 38 is old stat */
/* 38 is compat_43 stat */
#define SYS_getppid 39
/* 40 is old lstat */
/* 40 is compat_43 lstat */
#define SYS_dup 41
#define SYS_pipe 42
#define SYS_getegid 43
@ -67,16 +67,16 @@
#define SYS_execve 59
#define SYS_umask 60
#define SYS_chroot 61
/* 62 is old fstat */
/* 63 is old getkerninfo */
/* 64 is old getpagesize */
/* 62 is compat_43 fstat */
/* 63 is compat_43 getkerninfo */
/* 64 is compat_43 getpagesize */
#define SYS_msync 65
#define SYS_vfork 66
/* 67 is obsolete vread */
/* 68 is obsolete vwrite */
#define SYS_sbrk 69
#define SYS_sstk 70
/* 71 is old mmap */
/* 71 is compat_43 mmap */
#define SYS_vadvise 72
#define SYS_munmap 73
#define SYS_mprotect 74
@ -89,12 +89,12 @@
#define SYS_getpgrp 81
#define SYS_setpgid 82
#define SYS_setitimer 83
/* 84 is old wait */
/* 84 is compat_43 wait */
#define SYS_swapon 85
#define SYS_getitimer 86
/* 87 is old gethostname */
/* 88 is old sethostname */
/* 89 is old getdtablesize */
/* 87 is compat_43 gethostname */
/* 88 is compat_43 sethostname */
/* 89 is compat_43 getdtablesize */
#define SYS_dup2 90
#define SYS_fcntl 92
#define SYS_select 93
@ -102,22 +102,22 @@
#define SYS_setpriority 96
#define SYS_socket 97
#define SYS_connect 98
/* 99 is old accept */
/* 99 is compat_43 accept */
#define SYS_getpriority 100
/* 101 is old send */
/* 102 is old recv */
/* 101 is compat_43 send */
/* 102 is compat_43 recv */
#define SYS_sigreturn 103
#define SYS_bind 104
#define SYS_setsockopt 105
#define SYS_listen 106
/* 107 is obsolete vtimes */
/* 108 is old sigvec */
/* 109 is old sigblock */
/* 110 is old sigsetmask */
/* 108 is compat_43 sigvec */
/* 109 is compat_43 sigblock */
/* 110 is compat_43 sigsetmask */
#define SYS_sigsuspend 111
/* 112 is old sigstack */
/* 113 is old recvmsg */
/* 114 is old sendmsg */
/* 112 is compat_43 sigstack */
/* 113 is compat_43 recvmsg */
/* 114 is compat_43 sendmsg */
#define SYS_vtrace 115
/* 115 is obsolete vtrace */
#define SYS_gettimeofday 116
@ -129,12 +129,12 @@
#define SYS_settimeofday 122
#define SYS_fchown 123
#define SYS_fchmod 124
/* 125 is old recvfrom */
/* 126 is old setreuid */
/* 127 is old setregid */
/* 125 is compat_43 recvfrom */
/* 126 is compat_43 setreuid */
/* 127 is compat_43 setregid */
#define SYS_rename 128
/* 129 is old truncate */
/* 130 is old ftruncate */
/* 129 is compat_43 truncate */
/* 130 is compat_43 ftruncate */
#define SYS_flock 131
#define SYS_mkfifo 132
#define SYS_sendto 133
@ -145,28 +145,28 @@
#define SYS_utimes 138
/* 139 is obsolete 4.2 sigreturn */
#define SYS_adjtime 140
/* 141 is old getpeername */
/* 142 is old gethostid */
/* 143 is old sethostid */
/* 144 is old getrlimit */
/* 145 is old setrlimit */
/* 146 is old killpg */
/* 141 is compat_43 getpeername */
/* 142 is compat_43 gethostid */
/* 143 is compat_43 sethostid */
/* 144 is compat_43 getrlimit */
/* 145 is compat_43 setrlimit */
/* 146 is compat_43 killpg */
#define SYS_setsid 147
#define SYS_quotactl 148
/* 149 is old quota */
/* 150 is old getsockname */
/* 149 is compat_43 quota */
/* 150 is compat_43 getsockname */
#define SYS_nfssvc 155
/* 156 is old getdirentries */
/* 156 is compat_43 getdirentries */
#define SYS_statfs 157
#define SYS_fstatfs 158
#define SYS_getfh 161
/* 162 is old getdomainname */
/* 163 is old setdomainname */
/* 164 is old uname */
/* 162 is compat_09 getdomainname */
/* 163 is compat_09 setdomainname */
/* 164 is compat_09 uname */
#define SYS_sysarch 165
#define SYS_semsys 169
#define SYS_msgsys 170
#define SYS_shmsys 171
/* 169 is compat_10 semsys */
/* 170 is compat_10 msgsys */
/* 171 is compat_10 shmsys */
#define SYS_setgid 181
#define SYS_setegid 182
#define SYS_seteuid 183
@ -190,3 +190,15 @@
#define SYS___sysctl 202
#define SYS_mlock 203
#define SYS_munlock 204
#define SYS___semctl 220
#define SYS_semget 221
#define SYS_semop 222
#define SYS_semconfig 223
#define SYS_msgctl 224
#define SYS_msgget 225
#define SYS_msgsnd 226
#define SYS_msgrcv 227
#define SYS_shmat 228
#define SYS_shmctl 229
#define SYS_shmdt 230
#define SYS_shmget 231

943
sys/sys/syscallargs.h Normal file
View File

@ -0,0 +1,943 @@
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* created from NetBSD: syscalls.master,v 1.22 1994/06/29 06:33:10 cgd Exp
*/
#define syscallarg(x) union { x datum; register_t pad; }
struct exit_args {
syscallarg(int) rval;
};
struct read_args {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(u_int) nbyte;
};
struct write_args {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(u_int) nbyte;
};
struct open_args {
syscallarg(char *) path;
syscallarg(int) flags;
syscallarg(int) mode;
};
struct close_args {
syscallarg(int) fd;
};
struct wait4_args {
syscallarg(int) pid;
syscallarg(int *) status;
syscallarg(int) options;
syscallarg(struct rusage *) rusage;
};
struct compat_43_creat_args {
syscallarg(char *) path;
syscallarg(int) mode;
};
struct link_args {
syscallarg(char *) path;
syscallarg(char *) link;
};
struct unlink_args {
syscallarg(char *) path;
};
struct chdir_args {
syscallarg(char *) path;
};
struct fchdir_args {
syscallarg(int) fd;
};
struct mknod_args {
syscallarg(char *) path;
syscallarg(int) mode;
syscallarg(int) dev;
};
struct chmod_args {
syscallarg(char *) path;
syscallarg(int) mode;
};
struct chown_args {
syscallarg(char *) path;
syscallarg(int) uid;
syscallarg(int) gid;
};
struct obreak_args {
syscallarg(char *) nsize;
};
struct getfsstat_args {
syscallarg(struct statfs *) buf;
syscallarg(long) bufsize;
syscallarg(int) flags;
};
struct compat_43_lseek_args {
syscallarg(int) fd;
syscallarg(long) offset;
syscallarg(int) whence;
};
struct mount_args {
syscallarg(char *) type;
syscallarg(char *) path;
syscallarg(int) flags;
syscallarg(caddr_t) data;
};
struct unmount_args {
syscallarg(char *) path;
syscallarg(int) flags;
};
struct setuid_args {
syscallarg(uid_t) uid;
};
struct ptrace_args {
syscallarg(int) req;
syscallarg(pid_t) pid;
syscallarg(caddr_t) addr;
syscallarg(int) data;
};
struct recvmsg_args {
syscallarg(int) s;
syscallarg(struct msghdr *) msg;
syscallarg(int) flags;
};
struct sendmsg_args {
syscallarg(int) s;
syscallarg(caddr_t) msg;
syscallarg(int) flags;
};
struct recvfrom_args {
syscallarg(int) s;
syscallarg(caddr_t) buf;
syscallarg(size_t) len;
syscallarg(int) flags;
syscallarg(caddr_t) from;
syscallarg(int *) fromlenaddr;
};
struct accept_args {
syscallarg(int) s;
syscallarg(caddr_t) name;
syscallarg(int *) anamelen;
};
struct getpeername_args {
syscallarg(int) fdes;
syscallarg(caddr_t) asa;
syscallarg(int *) alen;
};
struct getsockname_args {
syscallarg(int) fdes;
syscallarg(caddr_t) asa;
syscallarg(int *) alen;
};
struct access_args {
syscallarg(char *) path;
syscallarg(int) flags;
};
struct chflags_args {
syscallarg(char *) path;
syscallarg(int) flags;
};
struct fchflags_args {
syscallarg(int) fd;
syscallarg(int) flags;
};
struct kill_args {
syscallarg(int) pid;
syscallarg(int) signum;
};
struct compat_43_stat_args {
syscallarg(char *) path;
syscallarg(struct ostat *) ub;
};
struct compat_43_lstat_args {
syscallarg(char *) path;
syscallarg(struct ostat *) ub;
};
struct dup_args {
syscallarg(u_int) fd;
};
struct profil_args {
syscallarg(caddr_t) samples;
syscallarg(u_int) size;
syscallarg(u_int) offset;
syscallarg(u_int) scale;
};
struct ktrace_args {
syscallarg(char *) fname;
syscallarg(int) ops;
syscallarg(int) facs;
syscallarg(int) pid;
};
struct sigaction_args {
syscallarg(int) signum;
syscallarg(struct sigaction *) nsa;
syscallarg(struct sigaction *) osa;
};
struct sigprocmask_args {
syscallarg(int) how;
syscallarg(sigset_t) mask;
};
struct getlogin_args {
syscallarg(char *) namebuf;
syscallarg(u_int) namelen;
};
struct setlogin_args {
syscallarg(char *) namebuf;
};
struct acct_args {
syscallarg(char *) path;
};
struct sigaltstack_args {
syscallarg(struct sigaltstack *) nss;
syscallarg(struct sigaltstack *) oss;
};
struct ioctl_args {
syscallarg(int) fd;
syscallarg(u_long) com;
syscallarg(caddr_t) data;
};
struct reboot_args {
syscallarg(int) opt;
};
struct revoke_args {
syscallarg(char *) path;
};
struct symlink_args {
syscallarg(char *) path;
syscallarg(char *) link;
};
struct readlink_args {
syscallarg(char *) path;
syscallarg(char *) buf;
syscallarg(int) count;
};
struct execve_args {
syscallarg(char *) path;
syscallarg(char * *) argp;
syscallarg(char * *) envp;
};
struct umask_args {
syscallarg(int) newmask;
};
struct chroot_args {
syscallarg(char *) path;
};
struct compat_43_fstat_args {
syscallarg(int) fd;
syscallarg(struct ostat *) sb;
};
struct compat_43_getkerninfo_args {
syscallarg(int) op;
syscallarg(char *) where;
syscallarg(int *) size;
syscallarg(int) arg;
};
struct msync_args {
syscallarg(caddr_t) addr;
syscallarg(int) len;
};
struct sbrk_args {
syscallarg(int) incr;
};
struct sstk_args {
syscallarg(int) incr;
};
struct compat_43_mmap_args {
syscallarg(caddr_t) addr;
syscallarg(int) len;
syscallarg(int) prot;
syscallarg(int) flags;
syscallarg(int) fd;
syscallarg(long) pos;
};
struct ovadvise_args {
syscallarg(int) anom;
};
struct munmap_args {
syscallarg(caddr_t) addr;
syscallarg(int) len;
};
struct mprotect_args {
syscallarg(caddr_t) addr;
syscallarg(int) len;
syscallarg(int) prot;
};
struct madvise_args {
syscallarg(caddr_t) addr;
syscallarg(int) len;
syscallarg(int) behav;
};
struct mincore_args {
syscallarg(caddr_t) addr;
syscallarg(int) len;
syscallarg(char *) vec;
};
struct getgroups_args {
syscallarg(u_int) gidsetsize;
syscallarg(gid_t *) gidset;
};
struct setgroups_args {
syscallarg(u_int) gidsetsize;
syscallarg(gid_t *) gidset;
};
struct setpgid_args {
syscallarg(int) pid;
syscallarg(int) pgid;
};
struct setitimer_args {
syscallarg(u_int) which;
syscallarg(struct itimerval *) itv;
syscallarg(struct itimerval *) oitv;
};
struct swapon_args {
syscallarg(char *) name;
};
struct getitimer_args {
syscallarg(u_int) which;
syscallarg(struct itimerval *) itv;
};
struct compat_43_gethostname_args {
syscallarg(char *) hostname;
syscallarg(u_int) len;
};
struct compat_43_sethostname_args {
syscallarg(char *) hostname;
syscallarg(u_int) len;
};
struct dup2_args {
syscallarg(u_int) from;
syscallarg(u_int) to;
};
struct fcntl_args {
syscallarg(int) fd;
syscallarg(int) cmd;
syscallarg(void *) arg;
};
struct select_args {
syscallarg(u_int) nd;
syscallarg(fd_set *) in;
syscallarg(fd_set *) ou;
syscallarg(fd_set *) ex;
syscallarg(struct timeval *) tv;
};
struct fsync_args {
syscallarg(int) fd;
};
struct setpriority_args {
syscallarg(int) which;
syscallarg(int) who;
syscallarg(int) prio;
};
struct socket_args {
syscallarg(int) domain;
syscallarg(int) type;
syscallarg(int) protocol;
};
struct connect_args {
syscallarg(int) s;
syscallarg(caddr_t) name;
syscallarg(int) namelen;
};
struct compat_43_accept_args {
syscallarg(int) s;
syscallarg(caddr_t) name;
syscallarg(int *) anamelen;
};
struct getpriority_args {
syscallarg(int) which;
syscallarg(int) who;
};
struct compat_43_send_args {
syscallarg(int) s;
syscallarg(caddr_t) buf;
syscallarg(int) len;
syscallarg(int) flags;
};
struct compat_43_recv_args {
syscallarg(int) s;
syscallarg(caddr_t) buf;
syscallarg(int) len;
syscallarg(int) flags;
};
struct sigreturn_args {
syscallarg(struct sigcontext *) sigcntxp;
};
struct bind_args {
syscallarg(int) s;
syscallarg(caddr_t) name;
syscallarg(int) namelen;
};
struct setsockopt_args {
syscallarg(int) s;
syscallarg(int) level;
syscallarg(int) name;
syscallarg(caddr_t) val;
syscallarg(int) valsize;
};
struct listen_args {
syscallarg(int) s;
syscallarg(int) backlog;
};
struct compat_43_sigvec_args {
syscallarg(int) signum;
syscallarg(struct sigvec *) nsv;
syscallarg(struct sigvec *) osv;
};
struct compat_43_sigblock_args {
syscallarg(int) mask;
};
struct compat_43_sigsetmask_args {
syscallarg(int) mask;
};
struct sigsuspend_args {
syscallarg(int) mask;
};
struct compat_43_sigstack_args {
syscallarg(struct sigstack *) nss;
syscallarg(struct sigstack *) oss;
};
struct compat_43_recvmsg_args {
syscallarg(int) s;
syscallarg(struct omsghdr *) msg;
syscallarg(int) flags;
};
struct compat_43_sendmsg_args {
syscallarg(int) s;
syscallarg(caddr_t) msg;
syscallarg(int) flags;
};
struct vtrace_args {
syscallarg(int) request;
syscallarg(int) value;
};
struct gettimeofday_args {
syscallarg(struct timeval *) tp;
syscallarg(struct timezone *) tzp;
};
struct getrusage_args {
syscallarg(int) who;
syscallarg(struct rusage *) rusage;
};
struct getsockopt_args {
syscallarg(int) s;
syscallarg(int) level;
syscallarg(int) name;
syscallarg(caddr_t) val;
syscallarg(int *) avalsize;
};
struct resuba_args {
syscallarg(int) value;
};
struct readv_args {
syscallarg(int) fd;
syscallarg(struct iovec *) iovp;
syscallarg(u_int) iovcnt;
};
struct writev_args {
syscallarg(int) fd;
syscallarg(struct iovec *) iovp;
syscallarg(u_int) iovcnt;
};
struct settimeofday_args {
syscallarg(struct timeval *) tv;
syscallarg(struct timezone *) tzp;
};
struct fchown_args {
syscallarg(int) fd;
syscallarg(int) uid;
syscallarg(int) gid;
};
struct fchmod_args {
syscallarg(int) fd;
syscallarg(int) mode;
};
struct compat_43_recvfrom_args {
syscallarg(int) s;
syscallarg(caddr_t) buf;
syscallarg(size_t) len;
syscallarg(int) flags;
syscallarg(caddr_t) from;
syscallarg(int *) fromlenaddr;
};
struct compat_43_setreuid_args {
syscallarg(int) ruid;
syscallarg(int) euid;
};
struct compat_43_setregid_args {
syscallarg(int) rgid;
syscallarg(int) egid;
};
struct rename_args {
syscallarg(char *) from;
syscallarg(char *) to;
};
struct compat_43_truncate_args {
syscallarg(char *) path;
syscallarg(long) length;
};
struct compat_43_ftruncate_args {
syscallarg(int) fd;
syscallarg(long) length;
};
struct flock_args {
syscallarg(int) fd;
syscallarg(int) how;
};
struct mkfifo_args {
syscallarg(char *) path;
syscallarg(int) mode;
};
struct sendto_args {
syscallarg(int) s;
syscallarg(caddr_t) buf;
syscallarg(size_t) len;
syscallarg(int) flags;
syscallarg(caddr_t) to;
syscallarg(int) tolen;
};
struct shutdown_args {
syscallarg(int) s;
syscallarg(int) how;
};
struct socketpair_args {
syscallarg(int) domain;
syscallarg(int) type;
syscallarg(int) protocol;
syscallarg(int *) rsv;
};
struct mkdir_args {
syscallarg(char *) path;
syscallarg(int) mode;
};
struct rmdir_args {
syscallarg(char *) path;
};
struct utimes_args {
syscallarg(char *) path;
syscallarg(struct timeval *) tptr;
};
struct adjtime_args {
syscallarg(struct timeval *) delta;
syscallarg(struct timeval *) olddelta;
};
struct compat_43_getpeername_args {
syscallarg(int) fdes;
syscallarg(caddr_t) asa;
syscallarg(int *) alen;
};
struct compat_43_sethostid_args {
syscallarg(int32_t) hostid;
};
struct compat_43_getrlimit_args {
syscallarg(u_int) which;
syscallarg(struct ogetrlimit *) rlp;
};
struct compat_43_setrlimit_args {
syscallarg(u_int) which;
syscallarg(struct ogetrlimit *) rlp;
};
struct compat_43_killpg_args {
syscallarg(int) pgid;
syscallarg(int) signum;
};
struct quotactl_args {
syscallarg(char *) path;
syscallarg(int) cmd;
syscallarg(int) uid;
syscallarg(caddr_t) arg;
};
struct compat_43_getsockname_args {
syscallarg(int) fdec;
syscallarg(caddr_t) asa;
syscallarg(int *) alen;
};
struct nfssvc_args {
syscallarg(int) flag;
syscallarg(caddr_t) argp;
};
struct compat_43_getdirentries_args {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(u_int) count;
syscallarg(long *) basep;
};
struct statfs_args {
syscallarg(char *) path;
syscallarg(struct statfs *) buf;
};
struct fstatfs_args {
syscallarg(int) fd;
syscallarg(struct statfs *) buf;
};
struct getfh_args {
syscallarg(char *) fname;
syscallarg(fhandle_t *) fhp;
};
struct compat_09_getdomainname_args {
syscallarg(char *) domainname;
syscallarg(int) len;
};
struct compat_09_setdomainname_args {
syscallarg(char *) domainname;
syscallarg(int) len;
};
struct compat_09_uname_args {
syscallarg(struct outsname *) name;
};
struct sysarch_args {
syscallarg(int) op;
syscallarg(char *) parms;
};
struct compat_10_semsys_args {
syscallarg(int) which;
syscallarg(int) a2;
syscallarg(int) a3;
syscallarg(int) a4;
syscallarg(int) a5;
};
struct compat_10_msgsys_args {
syscallarg(int) which;
syscallarg(int) a2;
syscallarg(int) a3;
syscallarg(int) a4;
syscallarg(int) a5;
syscallarg(int) a6;
};
struct compat_10_shmsys_args {
syscallarg(int) which;
syscallarg(int) a2;
syscallarg(int) a3;
syscallarg(int) a4;
};
struct setgid_args {
syscallarg(gid_t) gid;
};
struct setegid_args {
syscallarg(gid_t) egid;
};
struct seteuid_args {
syscallarg(uid_t) euid;
};
struct lfs_bmapv_args {
syscallarg(fsid_t *) fsidp;
syscallarg(struct block_info *) blkiov;
syscallarg(int) blkcnt;
};
struct lfs_markv_args {
syscallarg(fsid_t *) fsidp;
syscallarg(struct block_info *) blkiov;
syscallarg(int) blkcnt;
};
struct lfs_segclean_args {
syscallarg(fsid_t *) fsidp;
syscallarg(u_long) segment;
};
struct lfs_segwait_args {
syscallarg(fsid_t *) fsidp;
syscallarg(struct timeval *) tv;
};
struct stat_args {
syscallarg(char *) path;
syscallarg(struct stat *) ub;
};
struct fstat_args {
syscallarg(int) fd;
syscallarg(struct stat *) sb;
};
struct lstat_args {
syscallarg(char *) path;
syscallarg(struct stat *) ub;
};
struct pathconf_args {
syscallarg(char *) path;
syscallarg(int) name;
};
struct fpathconf_args {
syscallarg(int) fd;
syscallarg(int) name;
};
struct getrlimit_args {
syscallarg(u_int) which;
syscallarg(struct rlimit *) rlp;
};
struct setrlimit_args {
syscallarg(u_int) which;
syscallarg(struct rlimit *) rlp;
};
struct getdirentries_args {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(u_int) count;
syscallarg(long *) basep;
};
struct mmap_args {
syscallarg(caddr_t) addr;
syscallarg(size_t) len;
syscallarg(int) prot;
syscallarg(int) flags;
syscallarg(int) fd;
syscallarg(long) pad;
syscallarg(off_t) pos;
};
struct lseek_args {
syscallarg(int) fd;
syscallarg(int) pad;
syscallarg(off_t) offset;
syscallarg(int) whence;
};
struct truncate_args {
syscallarg(char *) path;
syscallarg(int) pad;
syscallarg(off_t) length;
};
struct ftruncate_args {
syscallarg(int) fd;
syscallarg(int) pad;
syscallarg(off_t) length;
};
struct __sysctl_args {
syscallarg(int *) name;
syscallarg(u_int) namelen;
syscallarg(void *) old;
syscallarg(size_t *) oldlenp;
syscallarg(void *) new;
syscallarg(size_t) newlen;
};
struct mlock_args {
syscallarg(caddr_t) addr;
syscallarg(size_t) len;
};
struct munlock_args {
syscallarg(caddr_t) addr;
syscallarg(size_t) len;
};
struct __semctl_args {
syscallarg(int) semid;
syscallarg(int) semnum;
syscallarg(int) cmd;
syscallarg(union semun *) arg;
};
struct semget_args {
syscallarg(key_t) key;
syscallarg(int) nsems;
syscallarg(int) semflg;
};
struct semop_args {
syscallarg(int) semid;
syscallarg(struct sembuf *) sops;
syscallarg(u_int) nsops;
};
struct semconfig_args {
syscallarg(int) flag;
};
struct msgctl_args {
syscallarg(int) msqid;
syscallarg(int) cmd;
syscallarg(struct msqid_ds *) buf;
};
struct msgget_args {
syscallarg(key_t) key;
syscallarg(int) msgflg;
};
struct msgsnd_args {
syscallarg(int) msqid;
syscallarg(void *) msgp;
syscallarg(size_t) msgsz;
syscallarg(int) msgflg;
};
struct msgrcv_args {
syscallarg(int) msqid;
syscallarg(void *) msgp;
syscallarg(size_t) msgsz;
syscallarg(long) msgtyp;
syscallarg(int) msgflg;
};
struct shmat_args {
syscallarg(int) shmid;
syscallarg(void *) shmaddr;
syscallarg(int) shmflg;
};
struct shmctl_args {
syscallarg(int) shmid;
syscallarg(int) cmd;
syscallarg(struct shmid_ds *) buf;
};
struct shmdt_args {
syscallarg(void *) shmaddr;
};
struct shmget_args {
syscallarg(key_t) key;
syscallarg(int) size;
syscallarg(int) shmflg;
};
#undef syscallarg

View File

@ -1,4 +1,4 @@
/* $NetBSD: systm.h,v 1.30 1994/06/29 06:45:40 cgd Exp $ */
/* $NetBSD: systm.h,v 1.31 1994/10/20 04:29:06 cgd Exp $ */
/*-
* Copyright (c) 1982, 1988, 1991, 1993
@ -94,13 +94,12 @@ extern dev_t swapdev; /* swapping device */
extern struct vnode *swapdev_vp;/* vnode equivalent to above */
extern struct sysent { /* system call table */
int sy_narg; /* number of arguments */
short sy_narg; /* number of args */
short sy_argsize; /* total size of arguments */
int (*sy_call)(); /* implementing function */
} sysent[];
extern int nsysent;
#ifdef SYSCALL_DEBUG
char *syscallnames[];
#endif
#define SCARG(p,k) ((p)->k.datum) /* get arg from args pointer */
extern int boothowto; /* reboot flags, from console subsystem */
@ -118,6 +117,7 @@ int enxio __P((void));
int eopnotsupp __P((void));
int seltrue __P((dev_t dev, int which, struct proc *p));
void *hashinit __P((int count, int type, u_long *hashmask));
int nosys __P((struct proc *, void *, register_t *));
#ifdef __GNUC__
volatile void panic __P((const char *, ...));

View File

@ -1,4 +1,6 @@
/* $NetBSD: types.h,v 1.17 1994/06/30 08:05:56 cgd Exp $ */
/* $Id: types.h,v 1.18 1994/10/20 04:29:07 cgd Exp $ */
/* $NetBSD: types.h,v 1.18 1994/10/20 04:29:07 cgd Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@ -44,6 +46,9 @@
#define _SYS_TYPES_H_
/* Machine type dependent parameters. */
#include <machine/types.h>
#include <machine/ansi.h>
#include <machine/endian.h>
#ifndef _POSIX_SOURCE
@ -55,23 +60,24 @@ typedef unsigned short ushort; /* Sys V compatibility */
typedef unsigned int uint; /* Sys V compatibility */
#endif
typedef unsigned long long u_quad_t; /* quads */
typedef long long quad_t;
typedef u_int64_t u_quad_t; /* quads */
typedef int64_t quad_t;
typedef quad_t * qaddr_t;
typedef char * caddr_t; /* core address */
typedef long daddr_t; /* disk address */
typedef unsigned long dev_t; /* device number */
typedef unsigned long fixpt_t; /* fixed point number */
typedef unsigned long gid_t; /* group id */
typedef unsigned long ino_t; /* inode number */
typedef unsigned short mode_t; /* permissions */
typedef unsigned short nlink_t; /* link count */
typedef int32_t daddr_t; /* disk address */
typedef int32_t dev_t; /* device number */
typedef u_int32_t fixpt_t; /* fixed point number */
typedef u_int32_t gid_t; /* group id */
typedef u_int32_t ino_t; /* inode number */
typedef long key_t; /* IPC key (for Sys V IPC) */
typedef u_int16_t mode_t; /* permissions */
typedef u_int16_t nlink_t; /* link count */
typedef quad_t off_t; /* file offset */
typedef long pid_t; /* process id */
typedef long segsz_t; /* segment size */
typedef long swblk_t; /* swap offset */
typedef unsigned long uid_t; /* user id */
typedef int32_t pid_t; /* process id */
typedef int32_t segsz_t; /* segment size */
typedef int32_t swblk_t; /* swap offset */
typedef u_int32_t uid_t; /* user id */
/*
* This belongs in unistd.h, but is placed here to ensure that programs
@ -86,14 +92,12 @@ __END_DECLS
#endif
#ifndef _POSIX_SOURCE
#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
#define minor(x) ((int)((x)&0xff)) /* minor number */
#define makedev(x,y) ((dev_t)(((x)<<8) | (y))) /* create dev_t */
/* Major, minor numbers, dev_t's. */
#define major(x) ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))
#define minor(x) ((int32_t)((x) & 0xff))
#define makedev(x,y) ((dev_t)(((x) << 8) | (y)))
#endif
#include <machine/ansi.h>
#include <machine/types.h>
#ifdef _BSD_CLOCK_T_
typedef _BSD_CLOCK_T_ clock_t;
#undef _BSD_CLOCK_T_
@ -127,11 +131,11 @@ typedef _BSD_TIME_T_ time_t;
#define FD_SETSIZE 256
#endif
typedef long fd_mask;
typedef int32_t fd_mask;
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
#ifndef howmany
#define howmany(x, y) (((x)+((y)-1))/(y))
#define howmany(x, y) (((x) + ((y) - 1)) / (y))
#endif
typedef struct fd_set {