From a64ba1822e9b19f18714b60b0f5344e86b270981 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 24 Jul 2003 01:41:27 +0000 Subject: [PATCH] Preliminary syscall messaging work. Adjust all _args structures to include an lwkt_msg at their base which will eventually allow syscalls to run asynch. Note that this is for the kernel copy of the arguments, the userland argument format has not changed for the standard syscall entry point. Begin abstracting a messaging syscall interface (#if 0'd out at the moment). Change the syscall2 entry point to take the new expanded argument structure into account. Change sysent argument calculation (AS macro) to take the new expanded argument structure into account. Note: existing linux, svr4, and ibcs2 emulation may break with this commit, though it is not intentional. --- sys/cpu/i386/include/segments.h | 4 +- sys/emulation/ibcs2/i386/Makefile | 5 +- sys/emulation/ibcs2/i386/ibcs2_proto.h | 62 ++++- sys/emulation/ibcs2/i386/ibcs2_syscall.h | 4 +- sys/emulation/ibcs2/i386/ibcs2_sysent.c | 6 +- sys/emulation/ibcs2/i386/syscalls.conf | 3 +- sys/emulation/linux/i386/Makefile | 5 +- sys/emulation/linux/i386/linux_proto.h | 159 ++++++++++- sys/emulation/linux/i386/linux_syscall.h | 4 +- sys/emulation/linux/i386/linux_sysent.c | 6 +- sys/emulation/linux/i386/syscalls.conf | 3 +- sys/emulation/svr4/Makefile | 5 +- sys/emulation/svr4/svr4_proto.h | 83 +++++- sys/emulation/svr4/svr4_syscall.h | 4 +- sys/emulation/svr4/svr4_syscallnames.c | 4 +- sys/emulation/svr4/svr4_sysent.c | 6 +- sys/emulation/svr4/syscalls.conf | 3 +- sys/i386/i386/exception.s | 42 ++- sys/i386/i386/genassym.c | 3 +- sys/i386/i386/machdep.c | 10 +- sys/i386/i386/trap.c | 171 +++++++++++- sys/i386/include/segments.h | 4 +- sys/kern/Makefile | 5 +- sys/kern/init_sysent.c | 6 +- sys/kern/kern_descrip.c | 60 +--- sys/kern/kern_event.c | 12 +- sys/kern/kern_exec.c | 10 +- sys/kern/kern_fork.c | 8 +- sys/kern/kern_ktrace.c | 10 +- sys/kern/kern_ntptime.c | 8 +- sys/kern/kern_prot.c | 159 +---------- sys/kern/kern_resource.c | 55 +--- sys/kern/kern_sig.c | 97 +------ sys/kern/kern_sysctl.c | 22 +- sys/kern/kern_time.c | 60 +--- sys/kern/kern_xxx.c | 44 +-- sys/kern/makesyscalls.sh | 72 +++-- sys/kern/subr_prof.c | 10 +- sys/kern/sys_generic.c | 76 +---- sys/kern/sys_process.c | 11 +- sys/kern/syscalls.c | 4 +- sys/kern/sysv_msg.c | 36 +-- sys/kern/sysv_sem.c | 26 +- sys/kern/sysv_shm.c | 32 +-- sys/kern/vfs_cache.c | 10 +- sys/kern/vfs_syscalls.c | 21 +- sys/platform/pc32/i386/exception.s | 42 ++- sys/platform/pc32/i386/genassym.c | 3 +- sys/platform/pc32/i386/machdep.c | 10 +- sys/platform/pc32/i386/trap.c | 171 +++++++++++- sys/platform/vkernel/i386/genassym.c | 3 +- sys/sys/msgport.h | 10 +- sys/sys/syscall-hide.h | 4 +- sys/sys/syscall.h | 4 +- sys/sys/syscall.mk | 6 +- sys/sys/sysproto.h | 271 +++++++++++++++++- sys/sys/sysunion.h | 338 +++++++++++++++++++++++ sys/sys/vmmeter.h | 5 +- sys/vm/vm_mmap.c | 8 +- 59 files changed, 1467 insertions(+), 858 deletions(-) create mode 100644 sys/sys/sysunion.h diff --git a/sys/cpu/i386/include/segments.h b/sys/cpu/i386/include/segments.h index 51d3f6b759..975f703099 100644 --- a/sys/cpu/i386/include/segments.h +++ b/sys/cpu/i386/include/segments.h @@ -36,7 +36,7 @@ * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/segments.h,v 1.24 1999/12/29 04:33:07 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/segments.h,v 1.4 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/segments.h,v 1.5 2003/07/24 01:41:24 dillon Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ @@ -198,7 +198,7 @@ struct region_descriptor { #if defined(SMP) || defined(APIC_IO) #define NIDT 256 /* we use them all */ #else -#define NIDT 129 /* 32 reserved, 16 h/w, 0 s/w, linux's 0x80 */ +#define NIDT 130 /* 32 reserved, 16 h/w, 0 s/w, 0x80, 0x81 */ #endif /* SMP || APIC_IO */ #define NRSVIDT 32 /* reserved entries for cpu exceptions */ diff --git a/sys/emulation/ibcs2/i386/Makefile b/sys/emulation/ibcs2/i386/Makefile index 0e5e1d23c0..7aa10df9f1 100644 --- a/sys/emulation/ibcs2/i386/Makefile +++ b/sys/emulation/ibcs2/i386/Makefile @@ -1,16 +1,17 @@ # Makefile for syscall tables # # $FreeBSD: src/sys/i386/ibcs2/Makefile,v 1.2 1999/08/28 00:43:56 peter Exp $ -# $DragonFly: src/sys/emulation/ibcs2/i386/Attic/Makefile,v 1.2 2003/06/17 04:28:35 dillon Exp $ +# $DragonFly: src/sys/emulation/ibcs2/i386/Attic/Makefile,v 1.3 2003/07/24 01:41:23 dillon Exp $ all: @echo "make ibcs2_sysent.c, ibcs2_isc_sysent.c or ibcs2_xenix_sysent.c only" -ibcs2_sysent.c ibcs2_syscall.h ibcs2_proto.h: ../../kern/makesyscalls.sh \ +ibcs2_sysent.c ibcs2_syscall.h ibcs2_proto.h ibcs2_union.h: ../../kern/makesyscalls.sh \ syscalls.master syscalls.conf -mv -f ibcs2_sysent.c ibcs2_sysent.c.bak -mv -f ibcs2_syscall.h ibcs2_syscall.h.bak -mv -f ibcs2_proto.h ibcs2_proto.h.bak + -mv -f ibcs2_union.h ibcs2_union.h.bak sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf ibcs2_isc_sysent.c ibcs2_isc_syscall.h : ../../kern/makesyscalls.sh \ diff --git a/sys/emulation/ibcs2/i386/ibcs2_proto.h b/sys/emulation/ibcs2/i386/ibcs2_proto.h index ab3697d5e9..38fe4f69b9 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_proto.h +++ b/sys/emulation/ibcs2/i386/ibcs2_proto.h @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_proto.h,v 1.3 2003/06/23 17:55:38 dillon Exp $ - * created from TurtleBSD: src/sys/i386/ibcs2/syscalls.master,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_proto.h,v 1.4 2003/07/24 01:41:23 dillon Exp $ + * created from DragonFly: src/sys/i386/ibcs2/syscalls.master,v 1.2 2003/06/17 04:28:35 dillon Exp */ #ifndef _IBCS2_SYSPROTO_H_ @@ -13,65 +13,81 @@ #include +#include + #define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ 0 : sizeof(register_t) - sizeof(t)) struct ibcs2_read_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; u_int nbytes; char nbytes_[PAD_(u_int)]; }; struct ibcs2_open_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct ibcs2_wait_args { + struct lwkt_msg lmsg; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; }; struct ibcs2_creat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct ibcs2_unlink_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct ibcs2_execv_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; }; struct ibcs2_chdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct ibcs2_time_args { + struct lwkt_msg lmsg; ibcs2_time_t * tp; char tp_[PAD_(ibcs2_time_t *)]; }; struct ibcs2_mknod_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; int dev; char dev_[PAD_(int)]; }; struct ibcs2_chmod_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct ibcs2_chown_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int uid; char uid_[PAD_(int)]; int gid; char gid_[PAD_(int)]; }; struct ibcs2_stat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_lseek_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; long offset; char offset_[PAD_(long)]; int whence; char whence_[PAD_(int)]; }; struct ibcs2_mount_args { + struct lwkt_msg lmsg; char * special; char special_[PAD_(char *)]; char * dir; char dir_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; @@ -80,66 +96,82 @@ struct ibcs2_mount_args { int len; char len_[PAD_(int)]; }; struct ibcs2_umount_args { + struct lwkt_msg lmsg; char * name; char name_[PAD_(char *)]; }; struct ibcs2_setuid_args { + struct lwkt_msg lmsg; int uid; char uid_[PAD_(int)]; }; struct ibcs2_stime_args { + struct lwkt_msg lmsg; long * timep; char timep_[PAD_(long *)]; }; struct ibcs2_alarm_args { + struct lwkt_msg lmsg; unsigned sec; char sec_[PAD_(unsigned)]; }; struct ibcs2_fstat_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_pause_args { + struct lwkt_msg lmsg; register_t dummy; }; struct ibcs2_utime_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct ibcs2_utimbuf * buf; char buf_[PAD_(struct ibcs2_utimbuf *)]; }; struct ibcs2_stty_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct sgttyb * buf; char buf_[PAD_(struct sgttyb *)]; }; struct ibcs2_gtty_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct sgttyb * buf; char buf_[PAD_(struct sgttyb *)]; }; struct ibcs2_access_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct ibcs2_nice_args { + struct lwkt_msg lmsg; int incr; char incr_[PAD_(int)]; }; struct ibcs2_statfs_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct ibcs2_statfs * buf; char buf_[PAD_(struct ibcs2_statfs *)]; int len; char len_[PAD_(int)]; int fstype; char fstype_[PAD_(int)]; }; struct ibcs2_kill_args { + struct lwkt_msg lmsg; int pid; char pid_[PAD_(int)]; int signo; char signo_[PAD_(int)]; }; struct ibcs2_fstatfs_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct ibcs2_statfs * buf; char buf_[PAD_(struct ibcs2_statfs *)]; int len; char len_[PAD_(int)]; int fstype; char fstype_[PAD_(int)]; }; struct ibcs2_pgrpsys_args { + struct lwkt_msg lmsg; int type; char type_[PAD_(int)]; caddr_t dummy; char dummy_[PAD_(caddr_t)]; int pid; char pid_[PAD_(int)]; int pgid; char pgid_[PAD_(int)]; }; struct ibcs2_xenix_args { + struct lwkt_msg lmsg; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -147,19 +179,24 @@ struct ibcs2_xenix_args { int a5; char a5_[PAD_(int)]; }; struct ibcs2_times_args { + struct lwkt_msg lmsg; struct tms * tp; char tp_[PAD_(struct tms *)]; }; struct ibcs2_plock_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; }; struct ibcs2_setgid_args { + struct lwkt_msg lmsg; int gid; char gid_[PAD_(int)]; }; struct ibcs2_sigsys_args { + struct lwkt_msg lmsg; int sig; char sig_[PAD_(int)]; ibcs2_sig_t fp; char fp_[PAD_(ibcs2_sig_t)]; }; struct ibcs2_msgsys_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -168,16 +205,19 @@ struct ibcs2_msgsys_args { int a6; char a6_[PAD_(int)]; }; struct ibcs2_sysi86_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; int * arg; char arg_[PAD_(int *)]; }; struct ibcs2_shmsys_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; int a4; char a4_[PAD_(int)]; }; struct ibcs2_semsys_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -185,69 +225,83 @@ struct ibcs2_semsys_args { int a5; char a5_[PAD_(int)]; }; struct ibcs2_ioctl_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; caddr_t data; char data_[PAD_(caddr_t)]; }; struct ibcs2_uadmin_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; int func; char func_[PAD_(int)]; caddr_t data; char data_[PAD_(caddr_t)]; }; struct ibcs2_utssys_args { + struct lwkt_msg lmsg; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int flag; char flag_[PAD_(int)]; }; struct ibcs2_execve_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; char ** envp; char envp_[PAD_(char **)]; }; struct ibcs2_fcntl_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; char * arg; char arg_[PAD_(char *)]; }; struct ibcs2_ulimit_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; int newlimit; char newlimit_[PAD_(int)]; }; struct ibcs2_rmdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct ibcs2_mkdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct ibcs2_getdents_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; int nbytes; char nbytes_[PAD_(int)]; }; struct ibcs2_sysfs_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; caddr_t d1; char d1_[PAD_(caddr_t)]; char * buf; char buf_[PAD_(char *)]; }; struct ibcs2_getmsg_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct ibcs2_stropts * ctl; char ctl_[PAD_(struct ibcs2_stropts *)]; struct ibcs2_stropts * dat; char dat_[PAD_(struct ibcs2_stropts *)]; int * flags; char flags_[PAD_(int *)]; }; struct ibcs2_putmsg_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct ibcs2_stropts * ctl; char ctl_[PAD_(struct ibcs2_stropts *)]; struct ibcs2_stropts * dat; char dat_[PAD_(struct ibcs2_stropts *)]; int flags; char flags_[PAD_(int)]; }; struct ibcs2_poll_args { + struct lwkt_msg lmsg; struct ibcs2_poll * fds; char fds_[PAD_(struct ibcs2_poll *)]; long nfds; char nfds_[PAD_(long)]; int timeout; char timeout_[PAD_(int)]; }; struct ibcs2_secure_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; @@ -256,19 +310,23 @@ struct ibcs2_secure_args { int a5; char a5_[PAD_(int)]; }; struct ibcs2_symlink_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char * link; char link_[PAD_(char *)]; }; struct ibcs2_lstat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_readlink_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char * buf; char buf_[PAD_(char *)]; int count; char count_[PAD_(int)]; }; struct ibcs2_isc_args { + struct lwkt_msg lmsg; register_t dummy; }; int ibcs2_read __P((struct ibcs2_read_args *)); diff --git a/sys/emulation/ibcs2/i386/ibcs2_syscall.h b/sys/emulation/ibcs2/i386/ibcs2_syscall.h index a99fc4c288..18092631df 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_syscall.h +++ b/sys/emulation/ibcs2/i386/ibcs2_syscall.h @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_syscall.h,v 1.3 2003/06/23 17:55:38 dillon Exp $ - * created from TurtleBSD: src/sys/i386/ibcs2/syscalls.master,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_syscall.h,v 1.4 2003/07/24 01:41:23 dillon Exp $ + * created from DragonFly: src/sys/i386/ibcs2/syscalls.master,v 1.2 2003/06/17 04:28:35 dillon Exp */ #define IBCS2_SYS_syscall 0 diff --git a/sys/emulation/ibcs2/i386/ibcs2_sysent.c b/sys/emulation/ibcs2/i386/ibcs2_sysent.c index 3198bd2ba3..a11ad63abb 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_sysent.c +++ b/sys/emulation/ibcs2/i386/ibcs2_sysent.c @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_sysent.c,v 1.3 2003/06/23 17:55:38 dillon Exp $ - * created from TurtleBSD: src/sys/i386/ibcs2/syscalls.master,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_sysent.c,v 1.4 2003/07/24 01:41:23 dillon Exp $ + * created from DragonFly: src/sys/i386/ibcs2/syscalls.master,v 1.2 2003/06/17 04:28:35 dillon Exp */ #include @@ -13,7 +13,7 @@ #include #include -#define AS(name) (sizeof(struct name) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(struct lwkt_msg)) / sizeof(register_t)) /* The casts are bogus but will do for now. */ struct sysent ibcs2_sysent[] = { diff --git a/sys/emulation/ibcs2/i386/syscalls.conf b/sys/emulation/ibcs2/i386/syscalls.conf index fa5e7cb64c..0ab685535d 100644 --- a/sys/emulation/ibcs2/i386/syscalls.conf +++ b/sys/emulation/ibcs2/i386/syscalls.conf @@ -1,7 +1,8 @@ # syscalls.conf $FreeBSD: src/sys/i386/ibcs2/syscalls.conf,v 1.6 1999/08/28 00:44:01 peter Exp $ -# syscalls.conf $DragonFly: src/sys/emulation/ibcs2/i386/Attic/syscalls.conf,v 1.2 2003/06/17 04:28:35 dillon Exp $ +# syscalls.conf $DragonFly: src/sys/emulation/ibcs2/i386/Attic/syscalls.conf,v 1.3 2003/07/24 01:41:23 dillon Exp $ sysnames="/dev/null" sysproto="ibcs2_proto.h" +sysunion="ibcs2_union.h" sysproto_h=_IBCS2_SYSPROTO_H_ syshdr="ibcs2_syscall.h" sysmk="/dev/null" diff --git a/sys/emulation/linux/i386/Makefile b/sys/emulation/linux/i386/Makefile index 06ee360fb6..1f897d25d6 100644 --- a/sys/emulation/linux/i386/Makefile +++ b/sys/emulation/linux/i386/Makefile @@ -1,14 +1,15 @@ # Makefile for syscall tables # # $FreeBSD: src/sys/i386/linux/Makefile,v 1.4 1999/08/28 00:45:21 peter Exp $ -# $DragonFly: src/sys/emulation/linux/i386/Makefile,v 1.2 2003/06/17 04:28:38 dillon Exp $ +# $DragonFly: src/sys/emulation/linux/i386/Makefile,v 1.3 2003/07/24 01:41:24 dillon Exp $ all: @echo "make linux_sysent.c only" -linux_sysent.c linux_syscall.h linux_proto.h: ../../kern/makesyscalls.sh \ +linux_sysent.c linux_syscall.h linux_proto.h linux_union.h: ../../kern/makesyscalls.sh \ syscalls.master syscalls.conf -mv -f linux_sysent.c linux_sysent.c.bak -mv -f linux_syscall.h linux_syscall.h.bak -mv -f linux_proto.h linux_proto.h.bak + -mv -f linux_union.h linux_union.h.bak sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf diff --git a/sys/emulation/linux/i386/linux_proto.h b/sys/emulation/linux/i386/linux_proto.h index 773ed8c296..2b3e45957b 100644 --- a/sys/emulation/linux/i386/linux_proto.h +++ b/sys/emulation/linux/i386/linux_proto.h @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_proto.h,v 1.3 2003/06/23 17:55:39 dillon Exp $ - * created from TurtleBSD: src/sys/i386/linux/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp + * $DragonFly: src/sys/emulation/linux/i386/linux_proto.h,v 1.4 2003/07/24 01:41:24 dillon Exp $ + * created from DragonFly: src/sys/i386/linux/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -13,71 +13,89 @@ #include +#include + #define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ 0 : sizeof(register_t) - sizeof(t)) struct linux_fork_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_open_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_int flags; char flags_[PAD_(l_int)]; l_int mode; char mode_[PAD_(l_int)]; }; struct linux_waitpid_args { + struct lwkt_msg lmsg; l_pid_t pid; char pid_[PAD_(l_pid_t)]; l_int * status; char status_[PAD_(l_int *)]; l_int options; char options_[PAD_(l_int)]; }; struct linux_creat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_int mode; char mode_[PAD_(l_int)]; }; struct linux_link_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct linux_unlink_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct linux_execve_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; char ** envp; char envp_[PAD_(char **)]; }; struct linux_chdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct linux_time_args { + struct lwkt_msg lmsg; l_time_t * tm; char tm_[PAD_(l_time_t *)]; }; struct linux_mknod_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_int mode; char mode_[PAD_(l_int)]; l_dev_t dev; char dev_[PAD_(l_dev_t)]; }; struct linux_chmod_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_mode_t mode; char mode_[PAD_(l_mode_t)]; }; struct linux_lchown16_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_uid16_t uid; char uid_[PAD_(l_uid16_t)]; l_gid16_t gid; char gid_[PAD_(l_gid16_t)]; }; struct linux_stat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct ostat * up; char up_[PAD_(struct ostat *)]; }; struct linux_lseek_args { + struct lwkt_msg lmsg; l_uint fdes; char fdes_[PAD_(l_uint)]; l_off_t off; char off_[PAD_(l_off_t)]; l_int whence; char whence_[PAD_(l_int)]; }; struct linux_getpid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_mount_args { + struct lwkt_msg lmsg; char * specialfile; char specialfile_[PAD_(char *)]; char * dir; char dir_[PAD_(char *)]; char * filesystemtype; char filesystemtype_[PAD_(char *)]; @@ -85,249 +103,314 @@ struct linux_mount_args { void * data; char data_[PAD_(void *)]; }; struct linux_oldumount_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct linux_setuid16_args { + struct lwkt_msg lmsg; l_uid16_t uid; char uid_[PAD_(l_uid16_t)]; }; struct linux_getuid16_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_stime_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_ptrace_args { + struct lwkt_msg lmsg; l_long req; char req_[PAD_(l_long)]; l_long pid; char pid_[PAD_(l_long)]; l_long addr; char addr_[PAD_(l_long)]; l_long data; char data_[PAD_(l_long)]; }; struct linux_alarm_args { + struct lwkt_msg lmsg; l_uint secs; char secs_[PAD_(l_uint)]; }; struct linux_fstat_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; struct ostat * up; char up_[PAD_(struct ostat *)]; }; struct linux_pause_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_utime_args { + struct lwkt_msg lmsg; char * fname; char fname_[PAD_(char *)]; struct l_utimbuf * times; char times_[PAD_(struct l_utimbuf *)]; }; struct linux_access_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_int flags; char flags_[PAD_(l_int)]; }; struct linux_nice_args { + struct lwkt_msg lmsg; l_int inc; char inc_[PAD_(l_int)]; }; struct linux_kill_args { + struct lwkt_msg lmsg; l_int pid; char pid_[PAD_(l_int)]; l_int signum; char signum_[PAD_(l_int)]; }; struct linux_rename_args { + struct lwkt_msg lmsg; char * from; char from_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct linux_mkdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_int mode; char mode_[PAD_(l_int)]; }; struct linux_rmdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct linux_pipe_args { + struct lwkt_msg lmsg; l_ulong * pipefds; char pipefds_[PAD_(l_ulong *)]; }; struct linux_times_args { + struct lwkt_msg lmsg; struct l_times_argv * buf; char buf_[PAD_(struct l_times_argv *)]; }; struct linux_brk_args { + struct lwkt_msg lmsg; l_ulong dsend; char dsend_[PAD_(l_ulong)]; }; struct linux_setgid16_args { + struct lwkt_msg lmsg; l_gid16_t gid; char gid_[PAD_(l_gid16_t)]; }; struct linux_getgid16_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_signal_args { + struct lwkt_msg lmsg; l_int sig; char sig_[PAD_(l_int)]; l_handler_t handler; char handler_[PAD_(l_handler_t)]; }; struct linux_geteuid16_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_getegid16_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_umount_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_int flags; char flags_[PAD_(l_int)]; }; struct linux_ioctl_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; l_uint cmd; char cmd_[PAD_(l_uint)]; l_ulong arg; char arg_[PAD_(l_ulong)]; }; struct linux_fcntl_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; l_uint cmd; char cmd_[PAD_(l_uint)]; l_ulong arg; char arg_[PAD_(l_ulong)]; }; struct linux_olduname_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_ustat_args { + struct lwkt_msg lmsg; l_dev_t dev; char dev_[PAD_(l_dev_t)]; struct l_ustat * ubuf; char ubuf_[PAD_(struct l_ustat *)]; }; struct linux_sigaction_args { + struct lwkt_msg lmsg; l_int sig; char sig_[PAD_(l_int)]; l_osigaction_t * nsa; char nsa_[PAD_(l_osigaction_t *)]; l_osigaction_t * osa; char osa_[PAD_(l_osigaction_t *)]; }; struct linux_sgetmask_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_ssetmask_args { + struct lwkt_msg lmsg; l_osigset_t mask; char mask_[PAD_(l_osigset_t)]; }; struct linux_setreuid16_args { + struct lwkt_msg lmsg; l_uid16_t ruid; char ruid_[PAD_(l_uid16_t)]; l_uid16_t euid; char euid_[PAD_(l_uid16_t)]; }; struct linux_setregid16_args { + struct lwkt_msg lmsg; l_gid16_t rgid; char rgid_[PAD_(l_gid16_t)]; l_gid16_t egid; char egid_[PAD_(l_gid16_t)]; }; struct linux_sigsuspend_args { + struct lwkt_msg lmsg; l_int hist0; char hist0_[PAD_(l_int)]; l_int hist1; char hist1_[PAD_(l_int)]; l_osigset_t mask; char mask_[PAD_(l_osigset_t)]; }; struct linux_sigpending_args { + struct lwkt_msg lmsg; l_osigset_t * mask; char mask_[PAD_(l_osigset_t *)]; }; struct linux_setrlimit_args { + struct lwkt_msg lmsg; l_uint resource; char resource_[PAD_(l_uint)]; struct l_rlimit * rlim; char rlim_[PAD_(struct l_rlimit *)]; }; struct linux_old_getrlimit_args { + struct lwkt_msg lmsg; l_uint resource; char resource_[PAD_(l_uint)]; struct l_rlimit * rlim; char rlim_[PAD_(struct l_rlimit *)]; }; struct linux_getgroups16_args { + struct lwkt_msg lmsg; l_uint gidsetsize; char gidsetsize_[PAD_(l_uint)]; l_gid16_t * gidset; char gidset_[PAD_(l_gid16_t *)]; }; struct linux_setgroups16_args { + struct lwkt_msg lmsg; l_uint gidsetsize; char gidsetsize_[PAD_(l_uint)]; l_gid16_t * gidset; char gidset_[PAD_(l_gid16_t *)]; }; struct linux_old_select_args { + struct lwkt_msg lmsg; struct l_old_select_argv * ptr; char ptr_[PAD_(struct l_old_select_argv *)]; }; struct linux_symlink_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct linux_readlink_args { + struct lwkt_msg lmsg; char * name; char name_[PAD_(char *)]; char * buf; char buf_[PAD_(char *)]; l_int count; char count_[PAD_(l_int)]; }; struct linux_uselib_args { + struct lwkt_msg lmsg; char * library; char library_[PAD_(char *)]; }; struct linux_reboot_args { + struct lwkt_msg lmsg; l_int magic1; char magic1_[PAD_(l_int)]; l_int magic2; char magic2_[PAD_(l_int)]; l_uint cmd; char cmd_[PAD_(l_uint)]; void * arg; char arg_[PAD_(void *)]; }; struct linux_readdir_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; struct l_dirent * dent; char dent_[PAD_(struct l_dirent *)]; l_uint count; char count_[PAD_(l_uint)]; }; struct linux_mmap_args { + struct lwkt_msg lmsg; struct l_mmap_argv * ptr; char ptr_[PAD_(struct l_mmap_argv *)]; }; struct linux_truncate_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_ulong length; char length_[PAD_(l_ulong)]; }; struct linux_statfs_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct l_statfs_buf * buf; char buf_[PAD_(struct l_statfs_buf *)]; }; struct linux_fstatfs_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; struct l_statfs_buf * buf; char buf_[PAD_(struct l_statfs_buf *)]; }; struct linux_ioperm_args { + struct lwkt_msg lmsg; l_ulong start; char start_[PAD_(l_ulong)]; l_ulong length; char length_[PAD_(l_ulong)]; l_int enable; char enable_[PAD_(l_int)]; }; struct linux_socketcall_args { + struct lwkt_msg lmsg; l_int what; char what_[PAD_(l_int)]; l_ulong args; char args_[PAD_(l_ulong)]; }; struct linux_syslog_args { + struct lwkt_msg lmsg; l_int type; char type_[PAD_(l_int)]; char * buf; char buf_[PAD_(char *)]; l_int len; char len_[PAD_(l_int)]; }; struct linux_setitimer_args { + struct lwkt_msg lmsg; l_int which; char which_[PAD_(l_int)]; struct l_itimerval * itv; char itv_[PAD_(struct l_itimerval *)]; struct l_itimerval * oitv; char oitv_[PAD_(struct l_itimerval *)]; }; struct linux_getitimer_args { + struct lwkt_msg lmsg; l_int which; char which_[PAD_(l_int)]; struct l_itimerval * itv; char itv_[PAD_(struct l_itimerval *)]; }; struct linux_newstat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct l_newstat * buf; char buf_[PAD_(struct l_newstat *)]; }; struct linux_newlstat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct l_newstat * buf; char buf_[PAD_(struct l_newstat *)]; }; struct linux_newfstat_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; struct l_newstat * buf; char buf_[PAD_(struct l_newstat *)]; }; struct linux_uname_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_iopl_args { + struct lwkt_msg lmsg; l_ulong level; char level_[PAD_(l_ulong)]; }; struct linux_vhangup_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_vm86old_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_wait4_args { + struct lwkt_msg lmsg; l_pid_t pid; char pid_[PAD_(l_pid_t)]; l_uint * status; char status_[PAD_(l_uint *)]; l_int options; char options_[PAD_(l_int)]; struct l_rusage * rusage; char rusage_[PAD_(struct l_rusage *)]; }; struct linux_swapoff_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_sysinfo_args { + struct lwkt_msg lmsg; struct l_sysinfo * info; char info_[PAD_(struct l_sysinfo *)]; }; struct linux_ipc_args { + struct lwkt_msg lmsg; l_uint what; char what_[PAD_(l_uint)]; l_int arg1; char arg1_[PAD_(l_int)]; l_int arg2; char arg2_[PAD_(l_int)]; @@ -336,61 +419,78 @@ struct linux_ipc_args { l_long arg5; char arg5_[PAD_(l_long)]; }; struct linux_sigreturn_args { + struct lwkt_msg lmsg; struct l_sigframe * sfp; char sfp_[PAD_(struct l_sigframe *)]; }; struct linux_clone_args { + struct lwkt_msg lmsg; l_int flags; char flags_[PAD_(l_int)]; void * stack; char stack_[PAD_(void *)]; }; struct linux_newuname_args { + struct lwkt_msg lmsg; struct l_new_utsname * buf; char buf_[PAD_(struct l_new_utsname *)]; }; struct linux_modify_ldt_args { + struct lwkt_msg lmsg; l_int func; char func_[PAD_(l_int)]; void * ptr; char ptr_[PAD_(void *)]; l_ulong bytecount; char bytecount_[PAD_(l_ulong)]; }; struct linux_adjtimex_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_sigprocmask_args { + struct lwkt_msg lmsg; l_int how; char how_[PAD_(l_int)]; l_osigset_t * mask; char mask_[PAD_(l_osigset_t *)]; l_osigset_t * omask; char omask_[PAD_(l_osigset_t *)]; }; struct linux_create_module_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_init_module_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_delete_module_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_get_kernel_syms_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_quotactl_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_bdflush_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_sysfs_args { + struct lwkt_msg lmsg; l_int option; char option_[PAD_(l_int)]; l_ulong arg1; char arg1_[PAD_(l_ulong)]; l_ulong arg2; char arg2_[PAD_(l_ulong)]; }; struct linux_personality_args { + struct lwkt_msg lmsg; l_ulong per; char per_[PAD_(l_ulong)]; }; struct linux_setfsuid16_args { + struct lwkt_msg lmsg; l_uid16_t uid; char uid_[PAD_(l_uid16_t)]; }; struct linux_setfsgid16_args { + struct lwkt_msg lmsg; l_gid16_t gid; char gid_[PAD_(l_gid16_t)]; }; struct linux_llseek_args { + struct lwkt_msg lmsg; l_int fd; char fd_[PAD_(l_int)]; l_ulong ohigh; char ohigh_[PAD_(l_ulong)]; l_ulong olow; char olow_[PAD_(l_ulong)]; @@ -398,11 +498,13 @@ struct linux_llseek_args { l_uint whence; char whence_[PAD_(l_uint)]; }; struct linux_getdents_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; void * dent; char dent_[PAD_(void *)]; l_uint count; char count_[PAD_(l_uint)]; }; struct linux_select_args { + struct lwkt_msg lmsg; l_int nfds; char nfds_[PAD_(l_int)]; l_fd_set * readfds; char readfds_[PAD_(l_fd_set *)]; l_fd_set * writefds; char writefds_[PAD_(l_fd_set *)]; @@ -410,34 +512,43 @@ struct linux_select_args { struct l_timeval * timeout; char timeout_[PAD_(struct l_timeval *)]; }; struct linux_msync_args { + struct lwkt_msg lmsg; l_ulong addr; char addr_[PAD_(l_ulong)]; l_size_t len; char len_[PAD_(l_size_t)]; l_int fl; char fl_[PAD_(l_int)]; }; struct linux_getsid_args { + struct lwkt_msg lmsg; l_pid_t pid; char pid_[PAD_(l_pid_t)]; }; struct linux_fdatasync_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; }; struct linux_sysctl_args { + struct lwkt_msg lmsg; struct l___sysctl_args * args; char args_[PAD_(struct l___sysctl_args *)]; }; struct linux_sched_setscheduler_args { + struct lwkt_msg lmsg; l_pid_t pid; char pid_[PAD_(l_pid_t)]; l_int policy; char policy_[PAD_(l_int)]; struct l_sched_param * param; char param_[PAD_(struct l_sched_param *)]; }; struct linux_sched_getscheduler_args { + struct lwkt_msg lmsg; l_pid_t pid; char pid_[PAD_(l_pid_t)]; }; struct linux_sched_get_priority_max_args { + struct lwkt_msg lmsg; l_int policy; char policy_[PAD_(l_int)]; }; struct linux_sched_get_priority_min_args { + struct lwkt_msg lmsg; l_int policy; char policy_[PAD_(l_int)]; }; struct linux_mremap_args { + struct lwkt_msg lmsg; l_ulong addr; char addr_[PAD_(l_ulong)]; l_ulong old_len; char old_len_[PAD_(l_ulong)]; l_ulong new_len; char new_len_[PAD_(l_ulong)]; @@ -445,107 +556,133 @@ struct linux_mremap_args { l_ulong new_addr; char new_addr_[PAD_(l_ulong)]; }; struct linux_setresuid16_args { + struct lwkt_msg lmsg; l_uid16_t ruid; char ruid_[PAD_(l_uid16_t)]; l_uid16_t euid; char euid_[PAD_(l_uid16_t)]; l_uid16_t suid; char suid_[PAD_(l_uid16_t)]; }; struct linux_getresuid16_args { + struct lwkt_msg lmsg; l_uid16_t * ruid; char ruid_[PAD_(l_uid16_t *)]; l_uid16_t * euid; char euid_[PAD_(l_uid16_t *)]; l_uid16_t * suid; char suid_[PAD_(l_uid16_t *)]; }; struct linux_vm86_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_query_module_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_nfsservctl_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_setresgid16_args { + struct lwkt_msg lmsg; l_gid16_t rgid; char rgid_[PAD_(l_gid16_t)]; l_gid16_t egid; char egid_[PAD_(l_gid16_t)]; l_gid16_t sgid; char sgid_[PAD_(l_gid16_t)]; }; struct linux_getresgid16_args { + struct lwkt_msg lmsg; l_gid16_t * rgid; char rgid_[PAD_(l_gid16_t *)]; l_gid16_t * egid; char egid_[PAD_(l_gid16_t *)]; l_gid16_t * sgid; char sgid_[PAD_(l_gid16_t *)]; }; struct linux_prctl_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_rt_sigreturn_args { + struct lwkt_msg lmsg; struct l_ucontext * ucp; char ucp_[PAD_(struct l_ucontext *)]; }; struct linux_rt_sigaction_args { + struct lwkt_msg lmsg; l_int sig; char sig_[PAD_(l_int)]; l_sigaction_t * act; char act_[PAD_(l_sigaction_t *)]; l_sigaction_t * oact; char oact_[PAD_(l_sigaction_t *)]; l_size_t sigsetsize; char sigsetsize_[PAD_(l_size_t)]; }; struct linux_rt_sigprocmask_args { + struct lwkt_msg lmsg; l_int how; char how_[PAD_(l_int)]; l_sigset_t * mask; char mask_[PAD_(l_sigset_t *)]; l_sigset_t * omask; char omask_[PAD_(l_sigset_t *)]; l_size_t sigsetsize; char sigsetsize_[PAD_(l_size_t)]; }; struct linux_rt_sigpending_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_rt_sigtimedwait_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_rt_sigqueueinfo_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_rt_sigsuspend_args { + struct lwkt_msg lmsg; l_sigset_t * newset; char newset_[PAD_(l_sigset_t *)]; l_size_t sigsetsize; char sigsetsize_[PAD_(l_size_t)]; }; struct linux_pread_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; char * buf; char buf_[PAD_(char *)]; l_size_t nbyte; char nbyte_[PAD_(l_size_t)]; l_loff_t offset; char offset_[PAD_(l_loff_t)]; }; struct linux_pwrite_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; char * buf; char buf_[PAD_(char *)]; l_size_t nbyte; char nbyte_[PAD_(l_size_t)]; l_loff_t offset; char offset_[PAD_(l_loff_t)]; }; struct linux_chown16_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_uid16_t uid; char uid_[PAD_(l_uid16_t)]; l_gid16_t gid; char gid_[PAD_(l_gid16_t)]; }; struct linux_getcwd_args { + struct lwkt_msg lmsg; char * buf; char buf_[PAD_(char *)]; l_ulong bufsize; char bufsize_[PAD_(l_ulong)]; }; struct linux_capget_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_capset_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_sigaltstack_args { + struct lwkt_msg lmsg; l_stack_t * uss; char uss_[PAD_(l_stack_t *)]; l_stack_t * uoss; char uoss_[PAD_(l_stack_t *)]; }; struct linux_sendfile_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_vfork_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_getrlimit_args { + struct lwkt_msg lmsg; l_uint resource; char resource_[PAD_(l_uint)]; struct l_rlimit * rlim; char rlim_[PAD_(struct l_rlimit *)]; }; struct linux_mmap2_args { + struct lwkt_msg lmsg; l_ulong addr; char addr_[PAD_(l_ulong)]; l_ulong len; char len_[PAD_(l_ulong)]; l_ulong prot; char prot_[PAD_(l_ulong)]; @@ -554,76 +691,94 @@ struct linux_mmap2_args { l_ulong pgoff; char pgoff_[PAD_(l_ulong)]; }; struct linux_truncate64_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_loff_t length; char length_[PAD_(l_loff_t)]; }; struct linux_ftruncate64_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; l_loff_t length; char length_[PAD_(l_loff_t)]; }; struct linux_stat64_args { + struct lwkt_msg lmsg; char * filename; char filename_[PAD_(char *)]; struct l_stat64 * statbuf; char statbuf_[PAD_(struct l_stat64 *)]; l_long flags; char flags_[PAD_(l_long)]; }; struct linux_lstat64_args { + struct lwkt_msg lmsg; char * filename; char filename_[PAD_(char *)]; struct l_stat64 * statbuf; char statbuf_[PAD_(struct l_stat64 *)]; l_long flags; char flags_[PAD_(l_long)]; }; struct linux_fstat64_args { + struct lwkt_msg lmsg; l_ulong fd; char fd_[PAD_(l_ulong)]; struct l_stat64 * statbuf; char statbuf_[PAD_(struct l_stat64 *)]; l_long flags; char flags_[PAD_(l_long)]; }; struct linux_lchown_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_uid_t uid; char uid_[PAD_(l_uid_t)]; l_gid_t gid; char gid_[PAD_(l_gid_t)]; }; struct linux_getuid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_getgid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_getgroups_args { + struct lwkt_msg lmsg; l_int gidsetsize; char gidsetsize_[PAD_(l_int)]; l_gid_t * grouplist; char grouplist_[PAD_(l_gid_t *)]; }; struct linux_setgroups_args { + struct lwkt_msg lmsg; l_int gidsetsize; char gidsetsize_[PAD_(l_int)]; l_gid_t * grouplist; char grouplist_[PAD_(l_gid_t *)]; }; struct linux_chown_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; l_uid_t uid; char uid_[PAD_(l_uid_t)]; l_gid_t gid; char gid_[PAD_(l_gid_t)]; }; struct linux_setfsuid_args { + struct lwkt_msg lmsg; l_uid_t uid; char uid_[PAD_(l_uid_t)]; }; struct linux_setfsgid_args { + struct lwkt_msg lmsg; l_gid_t gid; char gid_[PAD_(l_gid_t)]; }; struct linux_pivot_root_args { + struct lwkt_msg lmsg; char * new_root; char new_root_[PAD_(char *)]; char * put_old; char put_old_[PAD_(char *)]; }; struct linux_mincore_args { + struct lwkt_msg lmsg; l_ulong start; char start_[PAD_(l_ulong)]; l_size_t len; char len_[PAD_(l_size_t)]; u_char * vec; char vec_[PAD_(u_char *)]; }; struct linux_madvise_args { + struct lwkt_msg lmsg; register_t dummy; }; struct linux_getdents64_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; void * dirent; char dirent_[PAD_(void *)]; l_uint count; char count_[PAD_(l_uint)]; }; struct linux_fcntl64_args { + struct lwkt_msg lmsg; l_uint fd; char fd_[PAD_(l_uint)]; l_uint cmd; char cmd_[PAD_(l_uint)]; l_ulong arg; char arg_[PAD_(l_ulong)]; diff --git a/sys/emulation/linux/i386/linux_syscall.h b/sys/emulation/linux/i386/linux_syscall.h index c4f1d6bdb1..825e51cdc0 100644 --- a/sys/emulation/linux/i386/linux_syscall.h +++ b/sys/emulation/linux/i386/linux_syscall.h @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_syscall.h,v 1.3 2003/06/23 17:55:39 dillon Exp $ - * created from TurtleBSD: src/sys/i386/linux/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp + * $DragonFly: src/sys/emulation/linux/i386/linux_syscall.h,v 1.4 2003/07/24 01:41:24 dillon Exp $ + * created from DragonFly: src/sys/i386/linux/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp */ #define LINUX_SYS_exit 1 diff --git a/sys/emulation/linux/i386/linux_sysent.c b/sys/emulation/linux/i386/linux_sysent.c index 496f872596..a06bc1334a 100644 --- a/sys/emulation/linux/i386/linux_sysent.c +++ b/sys/emulation/linux/i386/linux_sysent.c @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_sysent.c,v 1.3 2003/06/23 17:55:39 dillon Exp $ - * created from TurtleBSD: src/sys/i386/linux/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp + * $DragonFly: src/sys/emulation/linux/i386/linux_sysent.c,v 1.4 2003/07/24 01:41:24 dillon Exp $ + * created from DragonFly: src/sys/i386/linux/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp */ #include "opt_compat.h" @@ -13,7 +13,7 @@ #include #include -#define AS(name) (sizeof(struct name) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(struct lwkt_msg)) / sizeof(register_t)) /* The casts are bogus but will do for now. */ struct sysent linux_sysent[] = { diff --git a/sys/emulation/linux/i386/syscalls.conf b/sys/emulation/linux/i386/syscalls.conf index acfbd7cbbe..92893d6f3e 100644 --- a/sys/emulation/linux/i386/syscalls.conf +++ b/sys/emulation/linux/i386/syscalls.conf @@ -1,7 +1,8 @@ # $FreeBSD: src/sys/i386/linux/syscalls.conf,v 1.5 1999/08/28 00:45:25 peter Exp $ -# $DragonFly: src/sys/emulation/linux/i386/syscalls.conf,v 1.2 2003/06/17 04:28:39 dillon Exp $ +# $DragonFly: src/sys/emulation/linux/i386/syscalls.conf,v 1.3 2003/07/24 01:41:24 dillon Exp $ sysnames="/dev/null" sysproto="linux_proto.h" +sysunion="linux_union.h" sysproto_h=_LINUX_SYSPROTO_H_ syshdr="linux_syscall.h" syssw="linux_sysent.c" diff --git a/sys/emulation/svr4/Makefile b/sys/emulation/svr4/Makefile index 2523bab598..54d954e9a3 100644 --- a/sys/emulation/svr4/Makefile +++ b/sys/emulation/svr4/Makefile @@ -1,16 +1,17 @@ # Makefile for syscall tables # # $FreeBSD: src/sys/svr4/Makefile,v 1.3 1999/09/01 00:32:18 newton Exp $ -# $DragonFly: src/sys/emulation/svr4/Attic/Makefile,v 1.2 2003/06/17 04:28:57 dillon Exp $ +# $DragonFly: src/sys/emulation/svr4/Attic/Makefile,v 1.3 2003/07/24 01:41:26 dillon Exp $ MAINTAINER= newton@freebsd.org all: @echo "make svr4_sysent.c only" -svr4_sysent.c svr4_syscall.h svr4_proto.h: ../kern/makesyscalls.sh \ +svr4_sysent.c svr4_syscall.h svr4_proto.h svr4_union.h: ../kern/makesyscalls.sh \ syscalls.master syscalls.conf -mv -f svr4_sysent.c svr4_sysent.c.bak -mv -f svr4_syscall.h svr4_syscall.h.bak -mv -f svr4_proto.h svr4_proto.h.bak + -mv -f svr4_union.h svr4_union.h.bak sh ../kern/makesyscalls.sh syscalls.master syscalls.conf diff --git a/sys/emulation/svr4/svr4_proto.h b/sys/emulation/svr4/svr4_proto.h index 0ea17ca254..587624caf0 100644 --- a/sys/emulation/svr4/svr4_proto.h +++ b/sys/emulation/svr4/svr4_proto.h @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/svr4/Attic/svr4_proto.h,v 1.3 2003/06/23 17:55:49 dillon Exp $ - * created from TurtleBSD: src/sys/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp + * $DragonFly: src/sys/emulation/svr4/Attic/svr4_proto.h,v 1.4 2003/07/24 01:41:26 dillon Exp $ + * created from DragonFly: src/sys/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp */ #ifndef _SVR4_SYSPROTO_H_ @@ -13,79 +13,100 @@ #include +#include + #define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ 0 : sizeof(register_t) - sizeof(t)) struct svr4_sys_open_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct svr4_sys_wait_args { + struct lwkt_msg lmsg; int * status; char status_[PAD_(int *)]; }; struct svr4_sys_creat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct svr4_sys_execv_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; }; struct svr4_sys_time_args { + struct lwkt_msg lmsg; time_t * t; char t_[PAD_(time_t *)]; }; struct svr4_sys_mknod_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; int dev; char dev_[PAD_(int)]; }; struct svr4_sys_break_args { + struct lwkt_msg lmsg; caddr_t nsize; char nsize_[PAD_(caddr_t)]; }; struct svr4_sys_stat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct svr4_stat * ub; char ub_[PAD_(struct svr4_stat *)]; }; struct svr4_sys_alarm_args { + struct lwkt_msg lmsg; unsigned sec; char sec_[PAD_(unsigned)]; }; struct svr4_sys_fstat_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct svr4_stat * sb; char sb_[PAD_(struct svr4_stat *)]; }; struct svr4_sys_pause_args { + struct lwkt_msg lmsg; register_t dummy; }; struct svr4_sys_utime_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct svr4_utimbuf * ubuf; char ubuf_[PAD_(struct svr4_utimbuf *)]; }; struct svr4_sys_access_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct svr4_sys_nice_args { + struct lwkt_msg lmsg; int prio; char prio_[PAD_(int)]; }; struct svr4_sys_kill_args { + struct lwkt_msg lmsg; int pid; char pid_[PAD_(int)]; int signum; char signum_[PAD_(int)]; }; struct svr4_sys_pgrpsys_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; int pid; char pid_[PAD_(int)]; int pgid; char pgid_[PAD_(int)]; }; struct svr4_sys_times_args { + struct lwkt_msg lmsg; struct tms * tp; char tp_[PAD_(struct tms *)]; }; struct svr4_sys_signal_args { + struct lwkt_msg lmsg; int signum; char signum_[PAD_(int)]; svr4_sig_t handler; char handler_[PAD_(svr4_sig_t)]; }; #if defined(NOTYET) struct svr4_sys_msgsys_args { + struct lwkt_msg lmsg; int what; char what_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -95,100 +116,121 @@ struct svr4_sys_msgsys_args { #else #endif struct svr4_sys_sysarch_args { + struct lwkt_msg lmsg; int op; char op_[PAD_(int)]; void * a1; char a1_[PAD_(void *)]; }; struct svr4_sys_ioctl_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; u_long com; char com_[PAD_(u_long)]; caddr_t data; char data_[PAD_(caddr_t)]; }; struct svr4_sys_utssys_args { + struct lwkt_msg lmsg; void * a1; char a1_[PAD_(void *)]; void * a2; char a2_[PAD_(void *)]; int sel; char sel_[PAD_(int)]; void * a3; char a3_[PAD_(void *)]; }; struct svr4_sys_execve_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; char ** envp; char envp_[PAD_(char **)]; }; struct svr4_sys_fcntl_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; char * arg; char arg_[PAD_(char *)]; }; struct svr4_sys_ulimit_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; long newlimit; char newlimit_[PAD_(long)]; }; struct svr4_sys_getdents_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; int nbytes; char nbytes_[PAD_(int)]; }; struct svr4_sys_getmsg_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct svr4_strbuf * ctl; char ctl_[PAD_(struct svr4_strbuf *)]; struct svr4_strbuf * dat; char dat_[PAD_(struct svr4_strbuf *)]; int * flags; char flags_[PAD_(int *)]; }; struct svr4_sys_putmsg_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct svr4_strbuf * ctl; char ctl_[PAD_(struct svr4_strbuf *)]; struct svr4_strbuf * dat; char dat_[PAD_(struct svr4_strbuf *)]; int flags; char flags_[PAD_(int)]; }; struct svr4_sys_poll_args { + struct lwkt_msg lmsg; struct pollfd * fds; char fds_[PAD_(struct pollfd *)]; unsigned int nfds; char nfds_[PAD_(unsigned int)]; int timeout; char timeout_[PAD_(int)]; }; struct svr4_sys_lstat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct svr4_stat * ub; char ub_[PAD_(struct svr4_stat *)]; }; struct svr4_sys_sigprocmask_args { + struct lwkt_msg lmsg; int how; char how_[PAD_(int)]; svr4_sigset_t * set; char set_[PAD_(svr4_sigset_t *)]; svr4_sigset_t * oset; char oset_[PAD_(svr4_sigset_t *)]; }; struct svr4_sys_sigsuspend_args { + struct lwkt_msg lmsg; svr4_sigset_t * ss; char ss_[PAD_(svr4_sigset_t *)]; }; struct svr4_sys_sigaltstack_args { + struct lwkt_msg lmsg; struct svr4_sigaltstack * nss; char nss_[PAD_(struct svr4_sigaltstack *)]; struct svr4_sigaltstack * oss; char oss_[PAD_(struct svr4_sigaltstack *)]; }; struct svr4_sys_sigaction_args { + struct lwkt_msg lmsg; int signum; char signum_[PAD_(int)]; struct svr4_sigaction * nsa; char nsa_[PAD_(struct svr4_sigaction *)]; struct svr4_sigaction * osa; char osa_[PAD_(struct svr4_sigaction *)]; }; struct svr4_sys_sigpending_args { + struct lwkt_msg lmsg; int what; char what_[PAD_(int)]; svr4_sigset_t * mask; char mask_[PAD_(svr4_sigset_t *)]; }; struct svr4_sys_context_args { + struct lwkt_msg lmsg; int func; char func_[PAD_(int)]; struct svr4_ucontext * uc; char uc_[PAD_(struct svr4_ucontext *)]; }; struct svr4_sys_statvfs_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct svr4_statvfs * fs; char fs_[PAD_(struct svr4_statvfs *)]; }; struct svr4_sys_fstatvfs_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct svr4_statvfs * fs; char fs_[PAD_(struct svr4_statvfs *)]; }; struct svr4_sys_waitsys_args { + struct lwkt_msg lmsg; int grp; char grp_[PAD_(int)]; int id; char id_[PAD_(int)]; union svr4_siginfo * info; char info_[PAD_(union svr4_siginfo *)]; int options; char options_[PAD_(int)]; }; struct svr4_sys_hrtsys_args { + struct lwkt_msg lmsg; int cmd; char cmd_[PAD_(int)]; int fun; char fun_[PAD_(int)]; int sub; char sub_[PAD_(int)]; @@ -196,10 +238,12 @@ struct svr4_sys_hrtsys_args { void * rv2; char rv2_[PAD_(void *)]; }; struct svr4_sys_pathconf_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int name; char name_[PAD_(int)]; }; struct svr4_sys_mmap_args { + struct lwkt_msg lmsg; caddr_t addr; char addr_[PAD_(caddr_t)]; svr4_size_t len; char len_[PAD_(svr4_size_t)]; int prot; char prot_[PAD_(int)]; @@ -208,39 +252,47 @@ struct svr4_sys_mmap_args { svr4_off_t pos; char pos_[PAD_(svr4_off_t)]; }; struct svr4_sys_fpathconf_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int name; char name_[PAD_(int)]; }; struct svr4_sys_xstat_args { + struct lwkt_msg lmsg; int two; char two_[PAD_(int)]; char * path; char path_[PAD_(char *)]; struct svr4_xstat * ub; char ub_[PAD_(struct svr4_xstat *)]; }; struct svr4_sys_lxstat_args { + struct lwkt_msg lmsg; int two; char two_[PAD_(int)]; char * path; char path_[PAD_(char *)]; struct svr4_xstat * ub; char ub_[PAD_(struct svr4_xstat *)]; }; struct svr4_sys_fxstat_args { + struct lwkt_msg lmsg; int two; char two_[PAD_(int)]; int fd; char fd_[PAD_(int)]; struct svr4_xstat * sb; char sb_[PAD_(struct svr4_xstat *)]; }; struct svr4_sys_xmknod_args { + struct lwkt_msg lmsg; int two; char two_[PAD_(int)]; char * path; char path_[PAD_(char *)]; svr4_mode_t mode; char mode_[PAD_(svr4_mode_t)]; svr4_dev_t dev; char dev_[PAD_(svr4_dev_t)]; }; struct svr4_sys_setrlimit_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; const struct svr4_rlimit * rlp; char rlp_[PAD_(const struct svr4_rlimit *)]; }; struct svr4_sys_getrlimit_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; struct svr4_rlimit * rlp; char rlp_[PAD_(struct svr4_rlimit *)]; }; struct svr4_sys_memcntl_args { + struct lwkt_msg lmsg; void * addr; char addr_[PAD_(void *)]; svr4_size_t len; char len_[PAD_(svr4_size_t)]; int cmd; char cmd_[PAD_(int)]; @@ -249,43 +301,53 @@ struct svr4_sys_memcntl_args { int mask; char mask_[PAD_(int)]; }; struct svr4_sys_uname_args { + struct lwkt_msg lmsg; struct svr4_utsname * name; char name_[PAD_(struct svr4_utsname *)]; int dummy; char dummy_[PAD_(int)]; }; struct svr4_sys_sysconfig_args { + struct lwkt_msg lmsg; int name; char name_[PAD_(int)]; }; struct svr4_sys_systeminfo_args { + struct lwkt_msg lmsg; int what; char what_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; long len; char len_[PAD_(long)]; }; struct svr4_sys_fchroot_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; }; struct svr4_sys_utimes_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct svr4_sys_vhangup_args { + struct lwkt_msg lmsg; register_t dummy; }; struct svr4_sys_gettimeofday_args { + struct lwkt_msg lmsg; struct timeval * tp; char tp_[PAD_(struct timeval *)]; }; struct svr4_sys_llseek_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; long offset1; char offset1_[PAD_(long)]; long offset2; char offset2_[PAD_(long)]; int whence; char whence_[PAD_(int)]; }; struct svr4_sys_acl_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int cmd; char cmd_[PAD_(int)]; int num; char num_[PAD_(int)]; struct svr4_aclent * buf; char buf_[PAD_(struct svr4_aclent *)]; }; struct svr4_sys_auditsys_args { + struct lwkt_msg lmsg; int code; char code_[PAD_(int)]; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; @@ -294,22 +356,26 @@ struct svr4_sys_auditsys_args { int a5; char a5_[PAD_(int)]; }; struct svr4_sys_facl_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; int num; char num_[PAD_(int)]; struct svr4_aclent * buf; char buf_[PAD_(struct svr4_aclent *)]; }; struct svr4_sys_resolvepath_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; char * buf; char buf_[PAD_(char *)]; size_t bufsiz; char bufsiz_[PAD_(size_t)]; }; struct svr4_sys_getdents64_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct svr4_dirent64 * dp; char dp_[PAD_(struct svr4_dirent64 *)]; int nbytes; char nbytes_[PAD_(int)]; }; struct svr4_sys_mmap64_args { + struct lwkt_msg lmsg; void * addr; char addr_[PAD_(void *)]; svr4_size_t len; char len_[PAD_(svr4_size_t)]; int prot; char prot_[PAD_(int)]; @@ -318,60 +384,73 @@ struct svr4_sys_mmap64_args { svr4_off64_t pos; char pos_[PAD_(svr4_off64_t)]; }; struct svr4_sys_stat64_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct svr4_stat64 * sb; char sb_[PAD_(struct svr4_stat64 *)]; }; struct svr4_sys_lstat64_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct svr4_stat64 * sb; char sb_[PAD_(struct svr4_stat64 *)]; }; struct svr4_sys_fstat64_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct svr4_stat64 * sb; char sb_[PAD_(struct svr4_stat64 *)]; }; struct svr4_sys_statvfs64_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct svr4_statvfs64 * fs; char fs_[PAD_(struct svr4_statvfs64 *)]; }; struct svr4_sys_fstatvfs64_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct svr4_statvfs64 * fs; char fs_[PAD_(struct svr4_statvfs64 *)]; }; struct svr4_sys_setrlimit64_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; const struct svr4_rlimit64 * rlp; char rlp_[PAD_(const struct svr4_rlimit64 *)]; }; struct svr4_sys_getrlimit64_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; struct svr4_rlimit64 * rlp; char rlp_[PAD_(struct svr4_rlimit64 *)]; }; struct svr4_sys_creat64_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct svr4_sys_open64_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct svr4_sys_socket_args { + struct lwkt_msg lmsg; int domain; char domain_[PAD_(int)]; int type; char type_[PAD_(int)]; int protocol; char protocol_[PAD_(int)]; }; struct svr4_sys_recv_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t buf; char buf_[PAD_(caddr_t)]; int len; char len_[PAD_(int)]; int flags; char flags_[PAD_(int)]; }; struct svr4_sys_send_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t buf; char buf_[PAD_(caddr_t)]; int len; char len_[PAD_(int)]; int flags; char flags_[PAD_(int)]; }; struct svr4_sys_sendto_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; void * buf; char buf_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; diff --git a/sys/emulation/svr4/svr4_syscall.h b/sys/emulation/svr4/svr4_syscall.h index 8d7db28389..ecf46b3dc8 100644 --- a/sys/emulation/svr4/svr4_syscall.h +++ b/sys/emulation/svr4/svr4_syscall.h @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/svr4/Attic/svr4_syscall.h,v 1.3 2003/06/23 17:55:49 dillon Exp $ - * created from TurtleBSD: src/sys/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp + * $DragonFly: src/sys/emulation/svr4/Attic/svr4_syscall.h,v 1.4 2003/07/24 01:41:26 dillon Exp $ + * created from DragonFly: src/sys/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp */ #define SVR4_SYS_exit 1 diff --git a/sys/emulation/svr4/svr4_syscallnames.c b/sys/emulation/svr4/svr4_syscallnames.c index 280fed240d..9fcf0a0358 100644 --- a/sys/emulation/svr4/svr4_syscallnames.c +++ b/sys/emulation/svr4/svr4_syscallnames.c @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/svr4/Attic/svr4_syscallnames.c,v 1.3 2003/06/23 17:55:49 dillon Exp $ - * created from TurtleBSD: src/sys/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp + * $DragonFly: src/sys/emulation/svr4/Attic/svr4_syscallnames.c,v 1.4 2003/07/24 01:41:26 dillon Exp $ + * created from DragonFly: src/sys/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp */ char *svr4_syscallnames[] = { diff --git a/sys/emulation/svr4/svr4_sysent.c b/sys/emulation/svr4/svr4_sysent.c index a22f073886..1e1fb1a752 100644 --- a/sys/emulation/svr4/svr4_sysent.c +++ b/sys/emulation/svr4/svr4_sysent.c @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/svr4/Attic/svr4_sysent.c,v 1.3 2003/06/23 17:55:49 dillon Exp $ - * created from TurtleBSD: src/sys/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp + * $DragonFly: src/sys/emulation/svr4/Attic/svr4_sysent.c,v 1.4 2003/07/24 01:41:26 dillon Exp $ + * created from DragonFly: src/sys/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp */ #include @@ -15,7 +15,7 @@ #include #include -#define AS(name) (sizeof(struct name) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(struct lwkt_msg)) / sizeof(register_t)) /* The casts are bogus but will do for now. */ struct sysent svr4_sysent[] = { diff --git a/sys/emulation/svr4/syscalls.conf b/sys/emulation/svr4/syscalls.conf index 8fe73149a6..261c4499c5 100644 --- a/sys/emulation/svr4/syscalls.conf +++ b/sys/emulation/svr4/syscalls.conf @@ -1,7 +1,8 @@ # $FreeBSD: src/sys/svr4/syscalls.conf,v 1.2 1999/08/28 00:51:29 peter Exp $ -# $DragonFly: src/sys/emulation/svr4/Attic/syscalls.conf,v 1.2 2003/06/17 04:28:58 dillon Exp $ +# $DragonFly: src/sys/emulation/svr4/Attic/syscalls.conf,v 1.3 2003/07/24 01:41:26 dillon Exp $ sysnames="svr4_syscallnames.c" sysproto="svr4_proto.h" +sysunion="svr4_union.h" sysproto_h=_SVR4_SYSPROTO_H_ syshdr="svr4_syscall.h" syssw="svr4_sysent.c" diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index 78637b9fcc..1125676365 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/exception.s,v 1.65.2.3 2001/08/15 01:23:49 peter Exp $ - * $DragonFly: src/sys/i386/i386/Attic/exception.s,v 1.15 2003/07/19 17:00:33 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/exception.s,v 1.16 2003/07/24 01:41:16 dillon Exp $ */ #include "npx.h" @@ -271,7 +271,7 @@ IDTVEC(syscall) jmp doreti /* - * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) + * Trap gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) * * Even though the name says 'int0x80', this is actually a TGT (trap gate) * rather then an IGT (interrupt gate). Thus interrupts are enabled on @@ -294,7 +294,7 @@ IDTVEC(int0x80_syscall) mov %ax,%fs movl $2,TF_ERR(%esp) /* sizeof "int 0x80" */ FAKE_MCOUNT(13*4(%esp)) - incl PCPU(cnt)+V_SYSCALL /* YYY per-cpu */ + incl PCPU(cnt)+V_SYSCALL call syscall2 MEXITCOUNT cli /* atomic reqflags interlock w/irq */ @@ -304,6 +304,42 @@ IDTVEC(int0x80_syscall) movl $1,PCPU(intr_nesting_level) jmp doreti +#if 0 +/* + * Trap gate entry for FreeBSD syscall messaging interface (int 0x81). + * Arguments are passed in registers, the return value is placed in %eax. + * + * eax:error = int0x81(eax:port, ecx:msg, edx:msgsize) + * + * Performs message sending, message and port waiting, and flushing + * functinos. + */ + SUPERALIGN_TEXT +IDTVEC(int0x81_syscall) + subl $8,%esp /* skip over tf_trapno and tf_err */ + pushal + pushl %ds + pushl %es + pushl %fs + mov $KDSEL,%ax /* switch to kernel segments */ + mov %ax,%ds + mov %ax,%es + mov $KPSEL,%ax + mov %ax,%fs + /* note: tf_err is not used */ + FAKE_MCOUNT(13*4(%esp)) + incl PCPU(cnt)+V_SENDSYS + call sendsys2 + MEXITCOUNT + cli /* atomic reqflags interlock w/irq */ + cmpl $0,PCPU(reqflags) + je doreti_syscall_ret + pushl $0 /* cpl to restore */ + movl $1,PCPU(intr_nesting_level) + jmp doreti + +#endif + /* * This function is what cpu_heavy_restore jumps to after a new process * is created. The LWKT subsystem switches while holding a critical diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c index 7cbca5fcae..d001f73a48 100644 --- a/sys/i386/i386/genassym.c +++ b/sys/i386/i386/genassym.c @@ -35,7 +35,7 @@ * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ - * $DragonFly: src/sys/i386/i386/Attic/genassym.c,v 1.26 2003/07/12 17:54:32 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/genassym.c,v 1.27 2003/07/24 01:41:16 dillon Exp $ */ #include "opt_user_ldt.h" @@ -108,6 +108,7 @@ ASSYM(SSLEEP, SSLEEP); ASSYM(SRUN, SRUN); ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap)); ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall)); +ASSYM(V_SENDSYS, offsetof(struct vmmeter, v_sendsys)); ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); ASSYM(V_FORWARDED_INTS, offsetof(struct vmmeter, v_forwarded_ints)); ASSYM(V_FORWARDED_HITS, offsetof(struct vmmeter, v_forwarded_hits)); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 938534419c..d13daad0de 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -36,7 +36,7 @@ * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.385.2.30 2003/05/31 08:48:05 alc Exp $ - * $DragonFly: src/sys/i386/i386/Attic/machdep.c,v 1.26 2003/07/11 17:42:08 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/machdep.c,v 1.27 2003/07/24 01:41:16 dillon Exp $ */ #include "apm.h" @@ -1378,7 +1378,9 @@ extern inthand_t IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), - IDTVEC(xmm), IDTVEC(syscall), IDTVEC(int0x80_syscall); + IDTVEC(xmm), IDTVEC(syscall); +extern inthand_t + IDTVEC(int0x80_syscall), IDTVEC(int0x81_syscall); void sdtossd(sd, ssd) @@ -1962,6 +1964,10 @@ init386(int first) setidt(19, &IDTVEC(xmm), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYS386TGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); +#if 0 + setidt(0x81, &IDTVEC(int0x81_syscall), + SDT_SYS386TGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); +#endif r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (int) idt; diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 4a2c6a376e..4f2f495f91 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -36,7 +36,7 @@ * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 * $FreeBSD: src/sys/i386/i386/trap.c,v 1.147.2.11 2003/02/27 19:09:59 luoqi Exp $ - * $DragonFly: src/sys/i386/i386/Attic/trap.c,v 1.25 2003/07/20 07:14:23 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/trap.c,v 1.26 2003/07/24 01:41:16 dillon Exp $ */ /* @@ -64,6 +64,8 @@ #ifdef KTRACE #include #endif +#include +#include #include #include @@ -104,6 +106,7 @@ int (*pmath_emulate) __P((struct trapframe *)); extern void trap __P((struct trapframe frame)); extern int trapwrite __P((unsigned addr)); extern void syscall2 __P((struct trapframe frame)); +extern void sendsys2 __P((struct trapframe frame)); static int trap_pfault __P((struct trapframe *, int, vm_offset_t)); static void trap_fatal __P((struct trapframe *, vm_offset_t)); @@ -1168,8 +1171,7 @@ int trapwrite(addr) * the current stack is allowed without having to hold MP lock. */ void -syscall2(frame) - struct trapframe frame; +syscall2(struct trapframe frame) { struct thread *td = curthread; struct proc *p = td->td_proc; @@ -1180,8 +1182,8 @@ syscall2(frame) u_quad_t sticks; int error; int narg; - int args[8]; u_int code; + union sysunion args; #ifdef DIAGNOSTIC if (ISPL(frame.tf_cs) != SEL_UPL) { @@ -1200,8 +1202,8 @@ syscall2(frame) * updated by the clock interrupt. Also use this opportunity * to lazy-raise our LWKT priority. */ - crit_enter(); userenter(); + crit_enter(); sticks = curthread->td_sticks; crit_exit(); @@ -1214,7 +1216,7 @@ syscall2(frame) /* * The prep code is not MP aware. */ - (*p->p_sysent->sv_prepsyscall)(&frame, args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(&frame, (int *)(&args.lmsg + 1), &code, ¶ms); } else { /* * Need to check if this is a 32 bit or 64 bit syscall. @@ -1250,10 +1252,10 @@ syscall2(frame) * copyin is MP aware, but the tracing code is not */ if (params && (i = narg * sizeof(int)) && - (error = copyin(params, (caddr_t)args, (u_int)i))) { + (error = copyin(params, (caddr_t)(&args.lmsg + 1), (u_int)i))) { #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(p->p_tracep, code, narg, args); + ktrsyscall(p->p_tracep, code, narg, (void *)(&args.lmsg + 1)); #endif goto bad; } @@ -1272,7 +1274,7 @@ syscall2(frame) #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) { - ktrsyscall(p->p_tracep, code, narg, args); + ktrsyscall(p->p_tracep, code, narg, (void *)(&args.lmsg + 1)); } #endif p->p_retval[0] = 0; @@ -1280,7 +1282,7 @@ syscall2(frame) STOPEVENT(p, S_SCE, narg); /* MP aware */ - error = (*callp->sy_call)(args); + error = (*callp->sy_call)(&args); /* * MP SAFE (we may or may not have the MP lock at this point) @@ -1357,6 +1359,155 @@ bad: #endif } +#if 0 /* work in progress */ + +/* + * sendsys2 - MP aware system message request C handler + */ +void +sendsys2(struct trapframe frame) +{ + struct thread *td = curthread; + struct proc *p = td->td_proc; + struct sysent *callp; + sysunion_t sysmsg; + u_quad_t sticks; + int error; + int narg; + u_int code; + int msgsize; + +#ifdef DIAGNOSTIC + if (ISPL(frame.tf_cs) != SEL_UPL) { + get_mplock(); + panic("syscall"); + /* NOT REACHED */ + } +#endif + +#ifdef SMP + KASSERT(curthread->td_mpcount == 0, ("badmpcount syscall from %p", (void *)frame.tf_eip)); + get_mplock(); +#endif + /* + * access non-atomic field from critical section. p_sticks is + * updated by the clock interrupt. Also use this opportunity + * to lazy-raise our LWKT priority. + */ + userenter(); + crit_enter(); + sticks = curthread->td_sticks; + crit_exit(); + + p->p_md.md_regs = &frame; + + /* + * Extract the system call message. If msgsize is zero we are + * blocking on a message and/or message port. + */ + if ((msgsize = frame.tf_edx) == 0) { + ... handle waiting ... + } + + /* + * Bad message size + */ + if (msgsize < 0 || msgsize > sizeof(*sysmsg)) { + error = ENOSYS; + goto bad; + } + + /* + * Obtain a sysunion structure from our per-cpu cache or allocate + * one. This per-cpu cache may be accessed by interrupts returning + * a message. + */ + crit_enter(); + if ((sysmsg = TAILQ_FIRST(&mycpu->gd_sysmsgq)) != NULL) { + TAILQ_REMOVE(&mycpu->gd_sysmsgq, sysmsg, lmsg.ms_node); + crit_exit(); + } else { + crit_exit(); + sysmsg = malloc(sizeof(*sysmsg), M_SYSMSG, M_WAITOK); + } + umsg = (void *)frame.tf_ecx; + if ((error = copyin(umsg, sysmsg, msgsize)) != 0) + goto bad; + + code = sysmsg->lmsg.ms_cmd; + + if (code >= p->p_sysent->sv_size) { + error = ENOSYS; + goto bad; + } + + callp = &p->p_sysent->sv_table[code]; + +#ifdef KTRACE + if (KTRPOINT(td, KTR_SYSCALL)) { + ktrsyscall(p->p_tracep, code, narg, (void *)(&args + 1)); + } +#endif + p->p_retval[0] = 0; + p->p_retval[1] = 0; + + STOPEVENT(p, S_SCE, narg); /* MP aware */ + + /* + * Make the system call. An error code is always returned, results + * are copied back via ms_result32 or ms_result64. + * + * NOTE! XXX if this is a child returning from a fork curproc + * might be different. + */ + error = (*callp->sy_call)(sysmsg); + + /* + * If a synchronous return copy p_retval to ms_result64. + */ + if (error != EASYNC) { + error = copyout(p->p_retval, &umsg->ms_result64, sizeof(umsg->ms_result64)); + } + frame.tf_eax = error; + + /* + * Traced syscall. trapsignal() is not MP aware. + */ + if ((orig_tf_eflags & PSL_T) && !(orig_tf_eflags & PSL_VM)) { + frame.tf_eflags &= ~PSL_T; + trapsignal(p, SIGTRAP, 0); + } + + /* + * Handle reschedule and other end-of-syscall issues + */ + userret(p, &frame, sticks); + +#ifdef KTRACE + if (KTRPOINT(td, KTR_SYSRET)) { + ktrsysret(p->p_tracep, code, error, p->p_retval[0]); + } +#endif + + /* + * This works because errno is findable through the + * register set. If we ever support an emulation where this + * is not the case, this code will need to be revisited. + */ + STOPEVENT(p, S_SCX, code); + + userexit(p); +#ifdef SMP + /* + * Release the MP lock if we had to get it + */ + KASSERT(curthread->td_mpcount == 1, ("badmpcount syscall from %p", (void *)frame.tf_eip)); + rel_mplock(); +#endif +} + +#endif + /* * Simplified back end of syscall(), used when returning from fork() * directly into user mode. MP lock is held on entry and should be diff --git a/sys/i386/include/segments.h b/sys/i386/include/segments.h index 5d275e494d..39724b2afe 100644 --- a/sys/i386/include/segments.h +++ b/sys/i386/include/segments.h @@ -36,7 +36,7 @@ * * from: @(#)segments.h 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/segments.h,v 1.24 1999/12/29 04:33:07 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/segments.h,v 1.4 2003/06/28 04:16:03 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/segments.h,v 1.5 2003/07/24 01:41:24 dillon Exp $ */ #ifndef _MACHINE_SEGMENTS_H_ @@ -198,7 +198,7 @@ struct region_descriptor { #if defined(SMP) || defined(APIC_IO) #define NIDT 256 /* we use them all */ #else -#define NIDT 129 /* 32 reserved, 16 h/w, 0 s/w, linux's 0x80 */ +#define NIDT 130 /* 32 reserved, 16 h/w, 0 s/w, 0x80, 0x81 */ #endif /* SMP || APIC_IO */ #define NRSVIDT 32 /* reserved entries for cpu exceptions */ diff --git a/sys/kern/Makefile b/sys/kern/Makefile index 8dd1a401e6..032c900e7c 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 8.2 (Berkeley) 3/21/94 # $FreeBSD: src/sys/kern/Makefile,v 1.6.2.1 2003/02/10 12:21:08 des Exp $ -# $DragonFly: src/sys/kern/Makefile,v 1.2 2003/06/17 04:28:41 dillon Exp $ +# $DragonFly: src/sys/kern/Makefile,v 1.3 2003/07/24 01:41:24 dillon Exp $ # Makefile for kernel tags files, init_sysent, etc. @@ -10,13 +10,14 @@ all: @echo "make tags, make links or init_sysent.c only" init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall-hide.h \ -../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master +../sys/syscall.mk ../sys/sysproto.h ../sys/sysunion.h: makesyscalls.sh syscalls.master -mv -f init_sysent.c init_sysent.c.bak -mv -f syscalls.c syscalls.c.bak -mv -f ../sys/syscall.h ../sys/syscall.h.bak -mv -f ../sys/syscall-hide.h ../sys/syscall-hide.h.bak -mv -f ../sys/syscall.mk ../sys/syscall.mk.bak -mv -f ../sys/sysproto.h ../sys/sysproto.h.bak + -mv -f ../sys/sysunion.h ../sys/sysunion.h.bak sh makesyscalls.sh syscalls.master # Kernel tags: diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 909e113c4f..ac8b92b5f6 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/kern/init_sysent.c,v 1.3 2003/06/23 17:55:41 dillon Exp $ - * created from TurtleBSD: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp + * $DragonFly: src/sys/kern/init_sysent.c,v 1.4 2003/07/24 01:41:24 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ #include "opt_compat.h" @@ -12,7 +12,7 @@ #include #include -#define AS(name) (sizeof(struct name) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(struct lwkt_msg)) / sizeof(register_t)) #ifdef COMPAT_43 #define compat(n, name) n, (sy_call_t *)__CONCAT(o,name) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index aa861014c4..b3ae38351d 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -37,7 +37,7 @@ * * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94 * $FreeBSD: src/sys/kern/kern_descrip.c,v 1.81.2.17 2003/06/06 20:21:32 tegge Exp $ - * $DragonFly: src/sys/kern/kern_descrip.c,v 1.7 2003/07/21 05:50:43 dillon Exp $ + * $DragonFly: src/sys/kern/kern_descrip.c,v 1.8 2003/07/24 01:41:24 dillon Exp $ */ #include "opt_compat.h" @@ -115,11 +115,6 @@ extern int cmask; /* * System calls on descriptors. */ -#ifndef _SYS_SYSPROTO_H_ -struct getdtablesize_args { - int dummy; -}; -#endif /* ARGSUSED */ int getdtablesize(struct getdtablesize_args *uap) @@ -137,12 +132,6 @@ getdtablesize(struct getdtablesize_args *uap) * note: keep in mind that a potential race condition exists when closing * descriptors from a shared descriptor table (via rfork). */ -#ifndef _SYS_SYSPROTO_H_ -struct dup2_args { - u_int from; - u_int to; -}; -#endif /* ARGSUSED */ int dup2(struct dup2_args *uap) @@ -177,11 +166,6 @@ retry: /* * Duplicate a file descriptor. */ -#ifndef _SYS_SYSPROTO_H_ -struct dup_args { - u_int fd; -}; -#endif /* ARGSUSED */ int dup(struct dup_args *uap) @@ -203,13 +187,6 @@ dup(struct dup_args *uap) /* * The file control system call. */ -#ifndef _SYS_SYSPROTO_H_ -struct fcntl_args { - int fd; - int cmd; - long arg; -}; -#endif /* ARGSUSED */ int fcntl(struct fcntl_args *uap) @@ -578,11 +555,6 @@ fgetown(sigio) /* * Close a file descriptor. */ -#ifndef _SYS_SYSPROTO_H_ -struct close_args { - int fd; -}; -#endif /* ARGSUSED */ int close(struct close_args *uap) @@ -643,12 +615,6 @@ close(struct close_args *uap) /* * Return status information about a file descriptor. */ -#ifndef _SYS_SYSPROTO_H_ -struct ofstat_args { - int fd; - struct ostat *sb; -}; -#endif /* ARGSUSED */ int ofstat(struct ofstat_args *uap) @@ -680,12 +646,6 @@ ofstat(struct ofstat_args *uap) /* * Return status information about a file descriptor. */ -#ifndef _SYS_SYSPROTO_H_ -struct fstat_args { - int fd; - struct stat *sb; -}; -#endif /* ARGSUSED */ int fstat(struct fstat_args *uap) @@ -713,12 +673,6 @@ fstat(struct fstat_args *uap) /* * Return status information about a file descriptor. */ -#ifndef _SYS_SYSPROTO_H_ -struct nfstat_args { - int fd; - struct nstat *sb; -}; -#endif /* ARGSUSED */ int nfstat(struct nfstat_args *uap) @@ -749,12 +703,6 @@ nfstat(struct nfstat_args *uap) /* * Return pathconf information about a file descriptor. */ -#ifndef _SYS_SYSPROTO_H_ -struct fpathconf_args { - int fd; - int name; -}; -#endif /* ARGSUSED */ int fpathconf(struct fpathconf_args *uap) @@ -1486,12 +1434,6 @@ fdrop(struct file *fp, struct thread *td) * Just attempt to get a record lock of the requested type on * the entire file (l_whence = SEEK_SET, l_start = 0, l_len = 0). */ -#ifndef _SYS_SYSPROTO_H_ -struct flock_args { - int fd; - int how; -}; -#endif /* ARGSUSED */ int flock(struct flock_args *uap) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 45c165a205..70c6b4f811 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_event.c,v 1.2.2.9 2003/05/08 07:47:16 kbyanc Exp $ - * $DragonFly: src/sys/kern/kern_event.c,v 1.5 2003/07/19 21:14:38 dillon Exp $ + * $DragonFly: src/sys/kern/kern_event.c,v 1.6 2003/07/24 01:41:25 dillon Exp $ */ #include @@ -381,16 +381,6 @@ kqueue(struct kqueue_args *uap) return (error); } -#ifndef _SYS_SYSPROTO_H_ -struct kevent_args { - int fd; - const struct kevent *changelist; - int nchanges; - struct kevent *eventlist; - int nevents; - const struct timespec *timeout; -}; -#endif int kevent(struct kevent_args *uap) { diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 510e5fc47e..6a60c7dfee 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_exec.c,v 1.107.2.15 2002/07/30 15:40:46 nectar Exp $ - * $DragonFly: src/sys/kern/kern_exec.c,v 1.7 2003/07/23 07:14:18 dillon Exp $ + * $DragonFly: src/sys/kern/kern_exec.c,v 1.8 2003/07/24 01:41:25 dillon Exp $ */ #include @@ -89,14 +89,6 @@ SYSCTL_INT(_kern, OID_AUTO, ps_argsopen, CTLFLAG_RW, &ps_argsopen, 0, ""); */ static const struct execsw **execsw; -#ifndef _SYS_SYSPROTO_H_ -struct execve_args { - char *fname; - char **argv; - char **envv; -}; -#endif - /* * execve() system call. */ diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index c8e21e2663..06c3c3568a 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -37,7 +37,7 @@ * * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 * $FreeBSD: src/sys/kern/kern_fork.c,v 1.72.2.13 2003/06/06 20:21:32 tegge Exp $ - * $DragonFly: src/sys/kern/kern_fork.c,v 1.12 2003/07/19 21:14:38 dillon Exp $ + * $DragonFly: src/sys/kern/kern_fork.c,v 1.13 2003/07/24 01:41:25 dillon Exp $ */ #include "opt_ktrace.h" @@ -81,12 +81,6 @@ struct forklist { TAILQ_HEAD(forklist_head, forklist); static struct forklist_head fork_list = TAILQ_HEAD_INITIALIZER(fork_list); -#ifndef _SYS_SYSPROTO_H_ -struct fork_args { - int dummy; -}; -#endif - int forksleep; /* Place for fork1() to sleep on. */ /* ARGSUSED */ diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index a8d3992b5c..90e0389f21 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -32,7 +32,7 @@ * * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93 * $FreeBSD: src/sys/kern/kern_ktrace.c,v 1.35.2.6 2002/07/05 22:36:38 darrenr Exp $ - * $DragonFly: src/sys/kern/kern_ktrace.c,v 1.5 2003/06/26 05:55:14 dillon Exp $ + * $DragonFly: src/sys/kern/kern_ktrace.c,v 1.6 2003/07/24 01:41:25 dillon Exp $ */ #include "opt_ktrace.h" @@ -259,14 +259,6 @@ ktrcsw(vp, out, user) /* * ktrace system call */ -#ifndef _SYS_SYSPROTO_H_ -struct ktrace_args { - char *fname; - int ops; - int facs; - int pid; -}; -#endif /* ARGSUSED */ int ktrace(struct ktrace_args *uap) diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index 468cc13679..6c0ed53848 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -29,7 +29,7 @@ * confusing and/or plain wrong in that context. * * $FreeBSD: src/sys/kern/kern_ntptime.c,v 1.32.2.2 2001/04/22 11:19:46 jhay Exp $ - * $DragonFly: src/sys/kern/kern_ntptime.c,v 1.4 2003/06/25 03:55:57 dillon Exp $ + * $DragonFly: src/sys/kern/kern_ntptime.c,v 1.5 2003/07/24 01:41:25 dillon Exp $ */ #include "opt_ntp.h" @@ -264,12 +264,6 @@ SYSCTL_OPAQUE(_kern_ntp_pll, OID_AUTO, time_freq, CTLFLAG_RD, &time_freq, sizeof * that the timex.constant structure member has a dual purpose to set * the time constant and to set the TAI offset. */ -#ifndef _SYS_SYSPROTO_H_ -struct ntp_adjtime_args { - struct timex *tp; -}; -#endif - int ntp_adjtime(struct ntp_adjtime_args *uap) { diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 7b8141ebb6..cddbde8c06 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -37,7 +37,7 @@ * * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/kern_prot.c,v 1.53.2.9 2002/03/09 05:20:26 dd Exp $ - * $DragonFly: src/sys/kern/kern_prot.c,v 1.5 2003/06/26 02:17:45 dillon Exp $ + * $DragonFly: src/sys/kern/kern_prot.c,v 1.6 2003/07/24 01:41:25 dillon Exp $ */ /* @@ -59,12 +59,6 @@ static MALLOC_DEFINE(M_CRED, "cred", "credentials"); -#ifndef _SYS_SYSPROTO_H_ -struct getpid_args { - int dummy; -}; -#endif - /* * NOT MP SAFE due to p_pptr access */ @@ -81,11 +75,6 @@ getpid(struct getpid_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct getppid_args { - int dummy; -}; -#endif /* ARGSUSED */ int getppid(struct getppid_args *uap) @@ -101,12 +90,6 @@ getppid(struct getppid_args *uap) * * MP SAFE */ -#ifndef _SYS_SYSPROTO_H_ -struct getpgrp_args { - int dummy; -}; -#endif - int getpgrp(struct getpgrp_args *uap) { @@ -116,13 +99,9 @@ getpgrp(struct getpgrp_args *uap) return (0); } -/* Get an arbitary pid's process group id */ -#ifndef _SYS_SYSPROTO_H_ -struct getpgid_args { - pid_t pid; -}; -#endif - +/* + * Get an arbitary pid's process group id + */ int getpgid(struct getpgid_args *uap) { @@ -143,12 +122,6 @@ found: /* * Get an arbitary pid's session id. */ -#ifndef _SYS_SYSPROTO_H_ -struct getsid_args { - pid_t pid; -}; -#endif - int getsid(struct getsid_args *uap) { @@ -170,12 +143,6 @@ found: /* * getuid() - MP SAFE */ -#ifndef _SYS_SYSPROTO_H_ -struct getuid_args { - int dummy; -}; -#endif - /* ARGSUSED */ int getuid(struct getuid_args *uap) @@ -192,12 +159,6 @@ getuid(struct getuid_args *uap) /* * geteuid() - MP SAFE */ -#ifndef _SYS_SYSPROTO_H_ -struct geteuid_args { - int dummy; -}; -#endif - /* ARGSUSED */ int geteuid(struct geteuid_args *uap) @@ -211,12 +172,6 @@ geteuid(struct geteuid_args *uap) /* * getgid() - MP SAFE */ -#ifndef _SYS_SYSPROTO_H_ -struct getgid_args { - int dummy; -}; -#endif - /* ARGSUSED */ int getgid(struct getgid_args *uap) @@ -235,12 +190,6 @@ getgid(struct getgid_args *uap) * via getgroups. This syscall exists because it is somewhat painful to do * correctly in a library function. */ -#ifndef _SYS_SYSPROTO_H_ -struct getegid_args { - int dummy; -}; -#endif - /* ARGSUSED */ int getegid(struct getegid_args *uap) @@ -251,12 +200,6 @@ getegid(struct getegid_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct getgroups_args { - u_int gidsetsize; - gid_t *gidset; -}; -#endif int getgroups(struct getgroups_args *uap) { @@ -283,12 +226,6 @@ getgroups(struct getgroups_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct setsid_args { - int dummy; -}; -#endif - /* ARGSUSED */ int setsid(struct setsid_args *uap) @@ -317,12 +254,6 @@ setsid(struct setsid_args *uap) * there must exist some pid in same session having pgid (EPERM) * pid must not be session leader (EPERM) */ -#ifndef _SYS_SYSPROTO_H_ -struct setpgid_args { - int pid; /* target process id */ - int pgid; /* target pgrp id */ -}; -#endif /* ARGSUSED */ int setpgid(struct setpgid_args *uap) @@ -365,11 +296,6 @@ setpgid(struct setpgid_args *uap) */ #define POSIX_APPENDIX_B_4_2_2 -#ifndef _SYS_SYSPROTO_H_ -struct setuid_args { - uid_t uid; -}; -#endif /* ARGSUSED */ int setuid(struct setuid_args *uap) @@ -454,11 +380,6 @@ setuid(struct setuid_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct seteuid_args { - uid_t euid; -}; -#endif /* ARGSUSED */ int seteuid(struct seteuid_args *uap) @@ -488,11 +409,6 @@ seteuid(struct seteuid_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct setgid_args { - gid_t gid; -}; -#endif /* ARGSUSED */ int setgid(struct setgid_args *uap) @@ -571,11 +487,6 @@ setgid(struct setgid_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct setegid_args { - gid_t egid; -}; -#endif /* ARGSUSED */ int setegid(struct setegid_args *uap) @@ -602,12 +513,6 @@ setegid(struct setegid_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct setgroups_args { - u_int gidsetsize; - gid_t *gidset; -}; -#endif /* ARGSUSED */ int setgroups(struct setgroups_args *uap) @@ -649,12 +554,6 @@ setgroups(struct setgroups_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct setreuid_args { - uid_t ruid; - uid_t euid; -}; -#endif /* ARGSUSED */ int setreuid(struct setreuid_args *uap) @@ -693,12 +592,6 @@ setreuid(struct setreuid_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct setregid_args { - gid_t rgid; - gid_t egid; -}; -#endif /* ARGSUSED */ int setregid(struct setregid_args *uap) @@ -744,13 +637,6 @@ setregid(struct setregid_args *uap) * saved uid is explicit. */ -#ifndef _SYS_SYSPROTO_H_ -struct setresuid_args { - uid_t ruid; - uid_t euid; - uid_t suid; -}; -#endif /* ARGSUSED */ int setresuid(struct setresuid_args *uap) @@ -793,13 +679,6 @@ setresuid(struct setresuid_args *uap) * saved gid is explicit. */ -#ifndef _SYS_SYSPROTO_H_ -struct setresgid_args { - gid_t rgid; - gid_t egid; - gid_t sgid; -}; -#endif /* ARGSUSED */ int setresgid(struct setresgid_args *uap) @@ -840,13 +719,6 @@ setresgid(struct setresgid_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct getresuid_args { - uid_t *ruid; - uid_t *euid; - uid_t *suid; -}; -#endif /* ARGSUSED */ int getresuid(struct getresuid_args *uap) @@ -867,13 +739,6 @@ getresuid(struct getresuid_args *uap) return error1 ? error1 : (error2 ? error2 : error3); } -#ifndef _SYS_SYSPROTO_H_ -struct getresgid_args { - gid_t *rgid; - gid_t *egid; - gid_t *sgid; -}; -#endif /* ARGSUSED */ int getresgid(struct getresgid_args *uap) @@ -895,11 +760,6 @@ getresgid(struct getresgid_args *uap) } -#ifndef _SYS_SYSPROTO_H_ -struct issetugid_args { - int dummy; -}; -#endif /* ARGSUSED */ int issetugid(struct issetugid_args *uap) @@ -1144,12 +1004,6 @@ cru2x(cr, xcr) /* * Get login name, if available. */ -#ifndef _SYS_SYSPROTO_H_ -struct getlogin_args { - char *namebuf; - u_int namelen; -}; -#endif /* ARGSUSED */ int getlogin(struct getlogin_args *uap) @@ -1165,11 +1019,6 @@ getlogin(struct getlogin_args *uap) /* * Set login name. */ -#ifndef _SYS_SYSPROTO_H_ -struct setlogin_args { - char *namebuf; -}; -#endif /* ARGSUSED */ int setlogin(struct setlogin_args *uap) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 34301dc881..c94960c155 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -37,7 +37,7 @@ * * @(#)kern_resource.c 8.5 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/kern_resource.c,v 1.55.2.5 2001/11/03 01:41:08 ps Exp $ - * $DragonFly: src/sys/kern/kern_resource.c,v 1.8 2003/07/23 02:30:20 dillon Exp $ + * $DragonFly: src/sys/kern/kern_resource.c,v 1.9 2003/07/24 01:41:25 dillon Exp $ */ #include "opt_compat.h" @@ -72,12 +72,6 @@ static struct uidinfo *uilookup __P((uid_t uid)); * Resource controls and accounting. */ -#ifndef _SYS_SYSPROTO_H_ -struct getpriority_args { - int which; - int who; -}; -#endif int getpriority(struct getpriority_args *uap) { @@ -131,13 +125,6 @@ getpriority(struct getpriority_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct setpriority_args { - int which; - int who; - int prio; -}; -#endif /* ARGSUSED */ int setpriority(struct setpriority_args *uap) @@ -217,19 +204,9 @@ donice(struct proc *chgp, int n) return (0); } -/* rtprio system call */ -#ifndef _SYS_SYSPROTO_H_ -struct rtprio_args { - int function; - pid_t pid; - struct rtprio *rtp; -}; -#endif - /* * Set realtime priority */ - /* ARGSUSED */ int rtprio(register struct rtprio_args *uap) @@ -297,12 +274,6 @@ rtprio(register struct rtprio_args *uap) } #if defined(COMPAT_43) || defined(COMPAT_SUNOS) -#ifndef _SYS_SYSPROTO_H_ -struct osetrlimit_args { - u_int which; - struct orlimit *rlp; -}; -#endif /* ARGSUSED */ int osetrlimit(struct osetrlimit_args *uap) @@ -319,12 +290,6 @@ osetrlimit(struct osetrlimit_args *uap) return (dosetrlimit(uap->which, &lim)); } -#ifndef _SYS_SYSPROTO_H_ -struct ogetrlimit_args { - u_int which; - struct orlimit *rlp; -}; -#endif /* ARGSUSED */ int ogetrlimit(struct ogetrlimit_args *uap) @@ -344,12 +309,6 @@ ogetrlimit(struct ogetrlimit_args *uap) } #endif /* COMPAT_43 || COMPAT_SUNOS */ -#ifndef _SYS_SYSPROTO_H_ -struct __setrlimit_args { - u_int which; - struct rlimit *rlp; -}; -#endif /* ARGSUSED */ int setrlimit(struct __setrlimit_args *uap) @@ -464,12 +423,6 @@ dosetrlimit(u_int which, struct rlimit *limp) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct __getrlimit_args { - u_int which; - struct rlimit *rlp; -}; -#endif /* ARGSUSED */ int getrlimit(struct __getrlimit_args *uap) @@ -517,12 +470,6 @@ calcru(p, up, sp, ip) splx(s); } -#ifndef _SYS_SYSPROTO_H_ -struct getrusage_args { - int who; - struct rusage *rusage; -}; -#endif /* ARGSUSED */ int getrusage(struct getrusage_args *uap) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index b189eb3ac4..a18c00f0dd 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -37,7 +37,7 @@ * * @(#)kern_sig.c 8.7 (Berkeley) 4/18/94 * $FreeBSD: src/sys/kern/kern_sig.c,v 1.72.2.17 2003/05/16 16:34:34 obrien Exp $ - * $DragonFly: src/sys/kern/kern_sig.c,v 1.11 2003/07/19 21:14:38 dillon Exp $ + * $DragonFly: src/sys/kern/kern_sig.c,v 1.12 2003/07/24 01:41:25 dillon Exp $ */ #include "opt_compat.h" @@ -318,13 +318,6 @@ do_sigaction(int sig, struct sigaction *act, struct sigaction *oact, int old) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct sigaction_args { - int sig; - struct sigaction *act; - struct sigaction *oact; -}; -#endif /* ARGSUSED */ int sigaction(struct sigaction_args *uap) @@ -347,13 +340,6 @@ sigaction(struct sigaction_args *uap) return (error); } -#ifndef _SYS_SYSPROTO_H_ -struct osigaction_args { - int signum; - struct osigaction *nsa; - struct osigaction *osa; -}; -#endif /* ARGSUSED */ int osigaction(struct osigaction_args *uap) @@ -483,14 +469,6 @@ do_sigprocmask(int how, sigset_t *set, sigset_t *oset, int old) /* * sigprocmask() - MP SAFE */ - -#ifndef _SYS_SYSPROTO_H_ -struct sigprocmask_args { - int how; - const sigset_t *set; - sigset_t *oset; -}; -#endif int sigprocmask(struct sigprocmask_args *uap) { @@ -515,13 +493,6 @@ sigprocmask(struct sigprocmask_args *uap) /* * osigprocmask() - MP SAFE */ - -#ifndef _SYS_SYSPROTO_H_ -struct osigprocmask_args { - int how; - osigset_t mask; -}; -#endif int osigprocmask(struct osigprocmask_args *uap) { @@ -534,11 +505,6 @@ osigprocmask(struct osigprocmask_args *uap) return (error); } -#ifndef _SYS_SYSPROTO_H_ -struct sigpending_args { - sigset_t *set; -}; -#endif /* ARGSUSED */ int sigpending(struct sigpending_args *uap) @@ -548,11 +514,6 @@ sigpending(struct sigpending_args *uap) return (copyout(&p->p_siglist, uap->set, sizeof(sigset_t))); } -#ifndef _SYS_SYSPROTO_H_ -struct osigpending_args { - int dummy; -}; -#endif /* ARGSUSED */ int osigpending(struct osigpending_args *uap) @@ -567,13 +528,6 @@ osigpending(struct osigpending_args *uap) /* * Generalized interface signal handler, 4.3-compatible. */ -#ifndef _SYS_SYSPROTO_H_ -struct osigvec_args { - int signum; - struct sigvec *nsv; - struct sigvec *osv; -}; -#endif /* ARGSUSED */ int osigvec(struct osigvec_args *uap) @@ -614,11 +568,6 @@ osigvec(struct osigvec_args *uap) return (error); } -#ifndef _SYS_SYSPROTO_H_ -struct osigblock_args { - int mask; -}; -#endif int osigblock(struct osigblock_args *uap) { @@ -634,11 +583,6 @@ osigblock(struct osigblock_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct osigsetmask_args { - int mask; -}; -#endif int osigsetmask(struct osigsetmask_args *uap) { @@ -660,11 +604,6 @@ osigsetmask(struct osigsetmask_args *uap) * in the meantime. Note nonstandard calling convention: * libc stub passes mask, not pointer, to save a copyin. */ -#ifndef _SYS_SYSPROTO_H_ -struct sigsuspend_args { - const sigset_t *sigmask; -}; -#endif /* ARGSUSED */ int sigsuspend(struct sigsuspend_args *uap) @@ -696,11 +635,6 @@ sigsuspend(struct sigsuspend_args *uap) return (EINTR); } -#ifndef _SYS_SYSPROTO_H_ -struct osigsuspend_args { - osigset_t mask; -}; -#endif /* ARGSUSED */ int osigsuspend(struct osigsuspend_args *uap) @@ -721,12 +655,6 @@ osigsuspend(struct osigsuspend_args *uap) } #if defined(COMPAT_43) || defined(COMPAT_SUNOS) -#ifndef _SYS_SYSPROTO_H_ -struct osigstack_args { - struct sigstack *nss; - struct sigstack *oss; -}; -#endif /* ARGSUSED */ int osigstack(struct osigstack_args *uap) @@ -750,12 +678,6 @@ osigstack(struct osigstack_args *uap) } #endif /* COMPAT_43 || COMPAT_SUNOS */ -#ifndef _SYS_SYSPROTO_H_ -struct sigaltstack_args { - stack_t *ss; - stack_t *oss; -}; -#endif /* ARGSUSED */ int sigaltstack(struct sigaltstack_args *uap) @@ -835,12 +757,6 @@ killpg1(int sig, int pgid, int all) return (nfound ? 0 : ESRCH); } -#ifndef _SYS_SYSPROTO_H_ -struct kill_args { - int pid; - int signum; -}; -#endif /* ARGSUSED */ int kill(struct kill_args *uap) @@ -871,12 +787,6 @@ kill(struct kill_args *uap) } #if defined(COMPAT_43) || defined(COMPAT_SUNOS) -#ifndef _SYS_SYSPROTO_H_ -struct okillpg_args { - int pgid; - int signum; -}; -#endif /* ARGSUSED */ int okillpg(struct okillpg_args *uap) @@ -1669,11 +1579,6 @@ out2: * Nonexistent system call-- signal process (may want to handle it). * Flag error in case process won't see signal immediately (blocked or ignored). */ -#ifndef _SYS_SYSPROTO_H_ -struct nosys_args { - int dummy; -}; -#endif /* ARGSUSED */ int nosys(struct nosys_args *args) diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 1c6e30e685..81e9e6d99d 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -38,7 +38,7 @@ * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 * $FreeBSD: src/sys/kern/kern_sysctl.c,v 1.92.2.9 2003/05/01 22:48:09 trhodes Exp $ - * $DragonFly: src/sys/kern/kern_sysctl.c,v 1.8 2003/07/23 07:14:18 dillon Exp $ + * $DragonFly: src/sys/kern/kern_sysctl.c,v 1.9 2003/07/24 01:41:25 dillon Exp $ */ #include "opt_compat.h" @@ -1133,17 +1133,6 @@ sysctl_root(SYSCTL_HANDLER_ARGS) return (error); } -#ifndef _SYS_SYSPROTO_H_ -struct sysctl_args { - int *name; - u_int namelen; - void *old; - size_t *oldlenp; - void *new; - size_t newlen; -}; -#endif - int __sysctl(struct sysctl_args *uap) { @@ -1305,15 +1294,6 @@ static struct { */ static char bsdi_strings[80]; /* It had better be less than this! */ -#ifndef _SYS_SYSPROTO_H_ -struct getkerninfo_args { - int op; - char *where; - size_t *size; - int arg; -}; -#endif - int ogetkerninfo(struct getkerninfo_args *uap) { diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 4eb9577193..171830ad49 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -32,7 +32,7 @@ * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/kern/kern_time.c,v 1.68.2.1 2002/10/01 08:00:41 bde Exp $ - * $DragonFly: src/sys/kern/kern_time.c,v 1.5 2003/07/19 21:14:38 dillon Exp $ + * $DragonFly: src/sys/kern/kern_time.c,v 1.6 2003/07/24 01:41:25 dillon Exp $ */ #include @@ -137,13 +137,6 @@ settime(tv) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct clock_gettime_args { - clockid_t clock_id; - struct timespec *tp; -}; -#endif - /* ARGSUSED */ int clock_gettime(struct clock_gettime_args *uap) @@ -156,13 +149,6 @@ clock_gettime(struct clock_gettime_args *uap) return (copyout(&ats, SCARG(uap, tp), sizeof(ats))); } -#ifndef _SYS_SYSPROTO_H_ -struct clock_settime_args { - clockid_t clock_id; - const struct timespec *tp; -}; -#endif - /* ARGSUSED */ int clock_settime(struct clock_settime_args *uap) @@ -187,13 +173,6 @@ clock_settime(struct clock_settime_args *uap) return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct clock_getres_args { - clockid_t clock_id; - struct timespec *tp; -}; -#endif - int clock_getres(struct clock_getres_args *uap) { @@ -255,13 +234,6 @@ nanosleep1(struct timespec *rqt, struct timespec *rmt) } } -#ifndef _SYS_SYSPROTO_H_ -struct nanosleep_args { - struct timespec *rqtp; - struct timespec *rmtp; -}; -#endif - /* ARGSUSED */ int nanosleep(struct nanosleep_args *uap) @@ -285,12 +257,6 @@ nanosleep(struct nanosleep_args *uap) return (error); } -#ifndef _SYS_SYSPROTO_H_ -struct gettimeofday_args { - struct timeval *tp; - struct timezone *tzp; -}; -#endif /* ARGSUSED */ int gettimeofday(struct gettimeofday_args *uap) @@ -310,12 +276,6 @@ gettimeofday(struct gettimeofday_args *uap) return (error); } -#ifndef _SYS_SYSPROTO_H_ -struct settimeofday_args { - struct timeval *tv; - struct timezone *tzp; -}; -#endif /* ARGSUSED */ int settimeofday(struct settimeofday_args *uap) @@ -349,12 +309,6 @@ int tickdelta; /* current clock skew, us. per tick */ long timedelta; /* unapplied time correction, us. */ static long bigadj = 1000000; /* use 10x skew above bigadj us. */ -#ifndef _SYS_SYSPROTO_H_ -struct adjtime_args { - struct timeval *delta; - struct timeval *olddelta; -}; -#endif /* ARGSUSED */ int adjtime(struct adjtime_args *uap) @@ -428,12 +382,6 @@ adjtime(struct adjtime_args *uap) * real time timers .it_interval. Rather, we compute the next time in * absolute time the timer should go off. */ -#ifndef _SYS_SYSPROTO_H_ -struct getitimer_args { - u_int which; - struct itimerval *itv; -}; -#endif /* ARGSUSED */ int getitimer(struct getitimer_args *uap) @@ -468,12 +416,6 @@ getitimer(struct getitimer_args *uap) sizeof (struct itimerval))); } -#ifndef _SYS_SYSPROTO_H_ -struct setitimer_args { - u_int which; - struct itimerval *itv, *oitv; -}; -#endif /* ARGSUSED */ int setitimer(struct setitimer_args *uap) diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index b7cc456097..677bed81a2 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -32,7 +32,7 @@ * * @(#)kern_xxx.c 8.2 (Berkeley) 11/14/93 * $FreeBSD: src/sys/kern/kern_xxx.c,v 1.31 1999/08/28 00:46:15 peter Exp $ - * $DragonFly: src/sys/kern/kern_xxx.c,v 1.4 2003/06/25 03:55:57 dillon Exp $ + * $DragonFly: src/sys/kern/kern_xxx.c,v 1.5 2003/07/24 01:41:25 dillon Exp $ */ #include "opt_compat.h" @@ -48,12 +48,6 @@ #if defined(COMPAT_43) || defined(COMPAT_SUNOS) -#ifndef _SYS_SYSPROTO_H_ -struct gethostname_args { - char *hostname; - u_int len; -}; -#endif /* ARGSUSED */ int ogethostname(struct gethostname_args *uap) @@ -67,12 +61,6 @@ ogethostname(struct gethostname_args *uap) 1, 0, 0, 0)); } -#ifndef _SYS_SYSPROTO_H_ -struct sethostname_args { - char *hostname; - u_int len; -}; -#endif /* ARGSUSED */ int osethostname(struct sethostname_args *uap) @@ -90,11 +78,6 @@ osethostname(struct sethostname_args *uap) return (userland_sysctl(name, 2, 0, 0, 0, uap->hostname, uap->len, 0)); } -#ifndef _SYS_SYSPROTO_H_ -struct ogethostid_args { - int dummy; -}; -#endif /* ARGSUSED */ int ogethostid(struct ogethostid_args *uap) @@ -107,11 +90,6 @@ ogethostid(struct ogethostid_args *uap) #endif /* COMPAT_43 || COMPAT_SUNOS */ #ifdef COMPAT_43 -#ifndef _SYS_SYSPROTO_H_ -struct osethostid_args { - long hostid; -}; -#endif /* ARGSUSED */ int osethostid(struct osethostid_args *uap) @@ -132,12 +110,6 @@ oquota(struct oquota_args *uap) } #endif /* COMPAT_43 */ -#ifndef _SYS_SYSPROTO_H_ -struct uname_args { - struct utsname *name; -}; -#endif - /* ARGSUSED */ int uname(struct uname_args *uap) @@ -202,13 +174,6 @@ uname(struct uname_args *uap) return 0; } -#ifndef _SYS_SYSPROTO_H_ -struct getdomainname_args { - char *domainname; - int len; -}; -#endif - /* ARGSUSED */ int getdomainname(struct getdomainname_args *uap) @@ -219,13 +184,6 @@ getdomainname(struct getdomainname_args *uap) return (copyout((caddr_t)domainname, (caddr_t)uap->domainname, uap->len)); } -#ifndef _SYS_SYSPROTO_H_ -struct setdomainname_args { - char *domainname; - int len; -}; -#endif - /* ARGSUSED */ int setdomainname(struct setdomainname_args *uap) diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index b76e112286..acdad613ef 100644 --- a/sys/kern/makesyscalls.sh +++ b/sys/kern/makesyscalls.sh @@ -1,7 +1,7 @@ #! /bin/sh - # @(#)makesyscalls.sh 8.1 (Berkeley) 6/10/93 # $FreeBSD: src/sys/kern/makesyscalls.sh,v 1.39.2.4 2001/10/20 09:01:24 marcel Exp $ -# $DragonFly: src/sys/kern/makesyscalls.sh,v 1.4 2003/06/23 17:55:41 dillon Exp $ +# $DragonFly: src/sys/kern/makesyscalls.sh,v 1.5 2003/07/24 01:41:25 dillon Exp $ set -e @@ -11,6 +11,7 @@ compat=COMPAT_43 # output files: sysnames="syscalls.c" sysproto="../sys/sysproto.h" +sysunion="../sys/sysunion.h" sysproto_h=_SYS_SYSPROTO_H_ syshdr="../sys/syscall.h" sysmk="../sys/syscall.mk" @@ -27,10 +28,11 @@ syscompatdcl="sysent.compatdcl.$$" sysent="sysent.switch.$$" sysinc="sysinc.switch.$$" sysarg="sysarg.switch.$$" +sysun="sysunion.switch.$$" -trap "rm $sysdcl $syscompat $syscompatdcl $sysent $sysinc $sysarg" 0 +trap "rm $sysdcl $syscompat $syscompatdcl $sysent $sysinc $sysarg $sysun" 0 -touch $sysdcl $syscompat $syscompatdcl $sysent $sysinc $sysarg +touch $sysdcl $syscompat $syscompatdcl $sysent $sysinc $sysarg $sysun case $# in 0) echo "Usage: $0 input-file " 1>&2 @@ -65,6 +67,7 @@ s/\$//g syssw = \"$syssw\" sysinc = \"$sysinc\" sysarg = \"$sysarg\" + sysun = \"$sysun\" sysnames = \"$sysnames\" syshdr = \"$syshdr\" sysmk = \"$sysmk\" @@ -78,30 +81,34 @@ s/\$//g printf "/*\n * System call switch table.\n *\n" > syssw printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw - printf " * \$\TurtleBSD\$\n" > syssw + printf " * \$\DragonFly\$\n" > syssw printf "/*\n * System call prototypes.\n *\n" > sysarg printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg - printf " * \$\TurtleBSD\$\n" > sysarg + printf " * \$\DragonFly\$\n" > sysarg printf "\n#ifdef %s\n\n", compat > syscompat printf "/*\n * System call names.\n *\n" > sysnames printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames - printf " * \$\TurtleBSD\$\n" > sysnames + printf " * \$\DragonFly\$\n" > sysnames printf "/*\n * System call numbers.\n *\n" > syshdr printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr - printf " * \$\TurtleBSD\$\n" > syshdr - printf "# TurtleBSD system call names.\n" > sysmk + printf " * \$\DragonFly\$\n" > syshdr + printf "# DragonFly system call names.\n" > sysmk printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk - printf "# \$\TurtleBSD\$\n" > sysmk + printf "# \$\DragonFly\$\n" > sysmk printf "/*\n * System call hiders.\n *\n" > syshide printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshide - printf " * \$\TurtleBSD\$\n" > syshide + printf " * \$\DragonFly\$\n" > syshide + + printf "/*\n * Union of syscall args for messaging.\n *\n" > sysun + printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysun + printf " * \$\DragonFly\$\n" > sysun } NR == 1 { - gsub("[$]TurtleBSD: ", "", $0) + gsub("[$]DragonFly: ", "", $0) gsub(" [$]", "", $0) printf " * created from%s\n */\n\n", $0 > syssw @@ -114,6 +121,7 @@ s/\$//g printf "#define\t%s\n\n", sysproto_h > sysarg printf "#include \n\n" > sysarg printf "#include \n\n" > sysarg + printf "#include \n\n" > sysarg printf "#define\tPAD_(t)\t(sizeof(register_t) <= sizeof(t) ? \\\n" > sysarg printf "\t\t0 : sizeof(register_t) - sizeof(t))\n\n" > sysarg @@ -125,6 +133,9 @@ s/\$//g printf "# created from%s\nMIASM = ", $0 > sysmk printf " * created from%s\n */\n\n", $0 > syshide + printf " * created from%s\n */\n\n", $0 > sysun + printf "union sysunion {\n" > sysun + printf "\tstruct lwkt_msg lmsg;\n" > sysun next } NF == 0 || $1 ~ /^;/ { @@ -141,6 +152,7 @@ s/\$//g print > syscompat print > sysnames print > syshide + print > sysun savesyscall = syscall next } @@ -148,6 +160,7 @@ s/\$//g print > sysent print > sysdcl print > sysarg + print > sysun print > syscompat print > sysnames print > syshide @@ -158,6 +171,7 @@ s/\$//g print > sysent print > sysdcl print > sysarg + print > sysun print > syscompat print > sysnames print > syshide @@ -219,12 +233,15 @@ s/\$//g f++ #function return type funcname=$f + usefuncname=$f if (funcalias == "") funcalias = funcname if (argalias == "") { argalias = funcname "_args" - if ($2 == "COMPAT") + if ($2 == "COMPAT") { argalias = "o" argalias + usefuncname = "o" funcname + } } f++ @@ -276,7 +293,9 @@ s/\$//g if ((!nosys || funcname != "nosys") && \ (funcname != "lkmnosys")) { if (argc != 0 && $2 != "NOARGS" && $2 != "NOPROTO") { + printf("\tstruct\t%s %s;\n", argalias, usefuncname) > sysun printf("struct\t%s {\n", argalias) > sysarg + printf("\tstruct lwkt_msg lmsg;\n") > sysarg for (i = 1; i <= argc; i++) printf("\t%s\t%s;\tchar %s_[PAD_(%s)];\n", argtype[i], argname[i], @@ -284,9 +303,13 @@ s/\$//g printf("};\n") > sysarg } else if ($2 != "NOARGS" && $2 != "NOPROTO" && \ - $2 != "NODEF") - printf("struct\t%s {\n\tregister_t dummy;\n};\n", - argalias) > sysarg + $2 != "NODEF") { + printf("\tstruct\t%s %s;\n", argalias, usefuncname) > sysun + printf("struct\t%s {\n", argalias) > sysarg + printf("\tstruct lwkt_msg lmsg;\n") > sysarg + printf("\tregister_t dummy;\n") > sysarg + printf("};\n") > sysarg + } } if (($2 != "NOPROTO" && $2 != "NODEF" && \ (funcname != "nosys" || !nosys)) || \ @@ -327,16 +350,24 @@ s/\$//g ncompat++ parseline() if (argc != 0 && $2 != "CPT_NOA") { + printf("#ifdef %s\n", compat) > sysun + printf("\tstruct\t%s %s;\n", argalias, usefuncname) > sysun + printf("#endif\n") > sysun printf("struct\t%s {\n", argalias) > syscompat + printf("\tstruct lwkt_msg lmsg;\n") > syscompat for (i = 1; i <= argc; i++) printf("\t%s\t%s;\tchar %s_[PAD_(%s)];\n", argtype[i], argname[i], argname[i], argtype[i]) > syscompat printf("};\n") > syscompat } - else if($2 != "CPT_NOA") - printf("struct\t%s {\n\tregister_t dummy;\n};\n", - argalias) > sysarg + else if($2 != "CPT_NOA") { + printf("\tstruct\t%s %s;\n", argalias, usefuncname) > sysun + printf("struct\t%s {\n", argalias) > sysarg + printf("\tstruct lwkt_msg lmsg;\n") > sysarg + printf("\tregister_t dummy;\n") > sysarg + printf("};\n") > sysarg + } printf("%s\to%s __P((struct %s *));\n", rettype, funcname, argalias) > syscompatdcl printf("\t{ compat(%s%s,%s) },", @@ -400,7 +431,7 @@ s/\$//g exit 1 } END { - printf "\n#define AS(name) (sizeof(struct name) / sizeof(register_t))\n" > sysinc + printf "\n#define AS(name) ((sizeof(struct name) - sizeof(struct lwkt_msg)) / sizeof(register_t))\n" > sysinc if (ncompat != 0) { printf "#include \"opt_compat.h\"\n\n" > syssw printf "\n#ifdef %s\n", compat > sysinc @@ -417,9 +448,12 @@ s/\$//g printf("\n") > sysmk printf("};\n") > sysent printf("};\n") > sysnames + printf("};\n") > sysun + printf("\ntypedef union sysunion *sysmsg_t;\n") > sysun printf("#define\t%sMAXSYSCALL\t%d\n", syscallprefix, syscall) \ > syshdr } ' cat $sysinc $sysent >> $syssw cat $sysarg $sysdcl $syscompat $syscompatdcl > $sysproto +cat $sysun > $sysunion diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c index f914b7cab0..2cfa2920e0 100644 --- a/sys/kern/subr_prof.c +++ b/sys/kern/subr_prof.c @@ -32,7 +32,7 @@ * * @(#)subr_prof.c 8.3 (Berkeley) 9/23/93 * $FreeBSD: src/sys/kern/subr_prof.c,v 1.32.2.2 2000/08/03 00:09:32 ps Exp $ - * $DragonFly: src/sys/kern/subr_prof.c,v 1.4 2003/07/12 17:54:35 dillon Exp $ + * $DragonFly: src/sys/kern/subr_prof.c,v 1.5 2003/07/24 01:41:25 dillon Exp $ */ #include @@ -343,14 +343,6 @@ SYSCTL_NODE(_kern, KERN_PROF, prof, CTLFLAG_RW, sysctl_kern_prof, ""); * The scale factor is a fixed point number with 16 bits of fraction, so that * 1.0 is represented as 0x10000. A scale factor of 0 turns off profiling. */ -#ifndef _SYS_SYSPROTO_H_ -struct profil_args { - caddr_t samples; - size_t size; - size_t offset; - u_int scale; -}; -#endif /* ARGSUSED */ int profil(struct profil_args *uap) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index c8b441d9fb..45035fe4e9 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -37,7 +37,7 @@ * * @(#)sys_generic.c 8.5 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/sys_generic.c,v 1.55.2.10 2001/03/17 10:39:32 peter Exp $ - * $DragonFly: src/sys/kern/sys_generic.c,v 1.6 2003/07/19 21:14:38 dillon Exp $ + * $DragonFly: src/sys/kern/sys_generic.c,v 1.7 2003/07/24 01:41:25 dillon Exp $ */ #include "opt_ktrace.h" @@ -99,13 +99,6 @@ holdfp(fdp, fd, flag) /* * Read system call. */ -#ifndef _SYS_SYSPROTO_H_ -struct read_args { - int fd; - void *buf; - size_t nbyte; -}; -#endif int read(struct read_args *uap) { @@ -125,15 +118,6 @@ read(struct read_args *uap) /* * Pread system call */ -#ifndef _SYS_SYSPROTO_H_ -struct pread_args { - int fd; - void *buf; - size_t nbyte; - int pad; - off_t offset; -}; -#endif int pread(struct pread_args *uap) { @@ -220,13 +204,6 @@ dofileread(fp, fd, buf, nbyte, offset, flags) /* * Scatter read system call. */ -#ifndef _SYS_SYSPROTO_H_ -struct readv_args { - int fd; - struct iovec *iovp; - u_int iovcnt; -}; -#endif int readv(struct readv_args *uap) { @@ -314,13 +291,6 @@ done: /* * Write system call */ -#ifndef _SYS_SYSPROTO_H_ -struct write_args { - int fd; - const void *buf; - size_t nbyte; -}; -#endif int write(struct write_args *uap) { @@ -341,15 +311,6 @@ write(struct write_args *uap) /* * Pwrite system call */ -#ifndef _SYS_SYSPROTO_H_ -struct pwrite_args { - int fd; - const void *buf; - size_t nbyte; - int pad; - off_t offset; -}; -#endif int pwrite(struct pwrite_args *uap) { @@ -437,13 +398,6 @@ dofilewrite( /* * Gather write system call */ -#ifndef _SYS_SYSPROTO_H_ -struct writev_args { - int fd; - struct iovec *iovp; - u_int iovcnt; -}; -#endif int writev(struct writev_args *uap) { @@ -541,13 +495,6 @@ done: /* * Ioctl system call */ -#ifndef _SYS_SYSPROTO_H_ -struct ioctl_args { - int fd; - u_long com; - caddr_t data; -}; -#endif /* ARGSUSED */ int ioctl(struct ioctl_args *uap) @@ -665,13 +612,6 @@ SYSCTL_INT(_kern, OID_AUTO, nselcoll, CTLFLAG_RD, &nselcoll, 0, ""); /* * Select system call. */ -#ifndef _SYS_SYSPROTO_H_ -struct select_args { - int nd; - fd_set *in, *ou, *ex; - struct timeval *tv; -}; -#endif int select(struct select_args *uap) { @@ -843,13 +783,6 @@ selscan(struct proc *p, fd_mask **ibits, fd_mask **obits, int nfd) /* * Poll system call. */ -#ifndef _SYS_SYSPROTO_H_ -struct poll_args { - struct pollfd *fds; - u_int nfds; - int timeout; -}; -#endif int poll(struct poll_args *uap) { @@ -976,13 +909,6 @@ pollscan(struct proc *p, struct pollfd *fds, u_int nfd) * OpenBSD poll system call. * XXX this isn't quite a true representation.. OpenBSD uses select ops. */ -#ifndef _SYS_SYSPROTO_H_ -struct openbsd_poll_args { - struct pollfd *fds; - u_int nfds; - int timeout; -}; -#endif int openbsd_poll(struct openbsd_poll_args *uap) { diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 8f6b954304..117836d7d2 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/sys_process.c,v 1.51.2.6 2003/01/08 03:06:45 kan Exp $ - * $DragonFly: src/sys/kern/sys_process.c,v 1.6 2003/07/19 21:14:39 dillon Exp $ + * $DragonFly: src/sys/kern/sys_process.c,v 1.7 2003/07/24 01:41:25 dillon Exp $ */ #include @@ -191,15 +191,6 @@ pwrite (struct proc *procp, unsigned int addr, unsigned int datum) { /* * Process debugging system call. */ -#ifndef _SYS_SYSPROTO_H_ -struct ptrace_args { - int req; - pid_t pid; - caddr_t addr; - int data; -}; -#endif - int ptrace(struct ptrace_args *uap) { diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 483108e6f6..6001abf99f 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/kern/syscalls.c,v 1.3 2003/06/23 17:55:41 dillon Exp $ - * created from TurtleBSD: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp + * $DragonFly: src/sys/kern/syscalls.c,v 1.4 2003/07/24 01:41:25 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ char *syscallnames[] = { diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index d1311e444e..bd9c7939af 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/kern/sysv_msg.c,v 1.23.2.5 2002/12/31 08:54:53 maxim Exp $ */ -/* $DragonFly: src/sys/kern/sysv_msg.c,v 1.5 2003/07/19 21:14:39 dillon Exp $ */ +/* $DragonFly: src/sys/kern/sysv_msg.c,v 1.6 2003/07/24 01:41:25 dillon Exp $ */ /* * Implementation of SVID messages @@ -237,14 +237,6 @@ msg_freehdr(struct msg *msghdr) free_msghdrs = msghdr; } -#ifndef _SYS_SYSPROTO_H_ -struct msgctl_args { - int msqid; - int cmd; - struct msqid_ds *buf; -}; -#endif - int msgctl(struct msgctl_args *uap) { @@ -378,13 +370,6 @@ msgctl(struct msgctl_args *uap) return(eval); } -#ifndef _SYS_SYSPROTO_H_ -struct msgget_args { - key_t key; - int msgflg; -}; -#endif - int msgget(struct msgget_args *uap) { @@ -486,15 +471,6 @@ found: return(0); } -#ifndef _SYS_SYSPROTO_H_ -struct msgsnd_args { - int msqid; - void *msgp; - size_t msgsz; - int msgflg; -}; -#endif - int msgsnd(struct msgsnd_args *uap) { @@ -808,16 +784,6 @@ msgsnd(struct msgsnd_args *uap) return(0); } -#ifndef _SYS_SYSPROTO_H_ -struct msgrcv_args { - int msqid; - void *msgp; - size_t msgsz; - long msgtyp; - int msgflg; -}; -#endif - int msgrcv(struct msgrcv_args *uap) { diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 88b565c2a5..f09c5e48e6 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/kern/sysv_sem.c,v 1.24.2.8 2002/10/22 20:45:03 fjoe Exp $ */ -/* $DragonFly: src/sys/kern/sysv_sem.c,v 1.4 2003/07/19 21:14:39 dillon Exp $ */ +/* $DragonFly: src/sys/kern/sysv_sem.c,v 1.5 2003/07/24 01:41:25 dillon Exp $ */ /* * Implementation of SVID semaphores @@ -389,14 +389,6 @@ semundo_clear(semid, semnum) /* * Note that the user-mode half of this passes a union, not a pointer */ -#ifndef _SYS_SYSPROTO_H_ -struct __semctl_args { - int semid; - int semnum; - int cmd; - union semun *arg; -}; -#endif int __semctl(struct __semctl_args *uap) @@ -556,14 +548,6 @@ __semctl(struct __semctl_args *uap) return(eval); } -#ifndef _SYS_SYSPROTO_H_ -struct semget_args { - key_t key; - int nsems; - int semflg; -}; -#endif - int semget(struct semget_args *uap) { @@ -672,14 +656,6 @@ found: return(0); } -#ifndef _SYS_SYSPROTO_H_ -struct semop_args { - int semid; - struct sembuf *sops; - u_int nsops; -}; -#endif - int semop(struct semop_args *uap) { diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 1e0fb79b05..c482e27805 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/kern/sysv_shm.c,v 1.45.2.6 2002/10/22 20:45:03 fjoe Exp $ */ -/* $DragonFly: src/sys/kern/sysv_shm.c,v 1.5 2003/07/23 07:14:18 dillon Exp $ */ +/* $DragonFly: src/sys/kern/sysv_shm.c,v 1.6 2003/07/24 01:41:25 dillon Exp $ */ /* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ /* @@ -214,12 +214,6 @@ shm_delete_mapping(struct vmspace *vm, struct shmmap_state *shmmap_s) return 0; } -#ifndef _SYS_SYSPROTO_H_ -struct shmdt_args { - void *shmaddr; -}; -#endif - int shmdt(struct shmdt_args *uap) { @@ -242,14 +236,6 @@ shmdt(struct shmdt_args *uap) return shm_delete_mapping(p->p_vmspace, shmmap_s); } -#ifndef _SYS_SYSPROTO_H_ -struct shmat_args { - int shmid; - void *shmaddr; - int shmflg; -}; -#endif - int shmat(struct shmat_args *uap) { @@ -391,14 +377,6 @@ oshmctl(p, uap) #endif } -#ifndef _SYS_SYSPROTO_H_ -struct shmctl_args { - int shmid; - int cmd; - struct shmid_ds *buf; -}; -#endif - int shmctl(struct shmctl_args *uap) { @@ -457,14 +435,6 @@ shmctl(struct shmctl_args *uap) return 0; } -#ifndef _SYS_SYSPROTO_H_ -struct shmget_args { - key_t key; - size_t size; - int shmflg; -}; -#endif - static int shmget_existing(p, uap, mode, segnum) struct proc *p; diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index caa58b9294..6543200c17 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -35,7 +35,7 @@ * * @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95 * $FreeBSD: src/sys/kern/vfs_cache.c,v 1.42.2.6 2001/10/05 20:07:03 dillon Exp $ - * $DragonFly: src/sys/kern/vfs_cache.c,v 1.4 2003/06/25 03:55:57 dillon Exp $ + * $DragonFly: src/sys/kern/vfs_cache.c,v 1.5 2003/07/24 01:41:25 dillon Exp $ */ #include @@ -520,14 +520,6 @@ vfs_cache_lookup(ap) return (VOP_CACHEDLOOKUP(dvp, vpp, cnp)); } - -#ifndef _SYS_SYSPROTO_H_ -struct __getcwd_args { - u_char *buf; - u_int buflen; -}; -#endif - static int disablecwd; SYSCTL_INT(_debug, OID_AUTO, disablecwd, CTLFLAG_RW, &disablecwd, 0, ""); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 706e009fba..26209d5514 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -37,7 +37,7 @@ * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 * $FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.151.2.18 2003/04/04 20:35:58 tegge Exp $ - * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.9 2003/07/19 21:14:39 dillon Exp $ + * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.10 2003/07/24 01:41:25 dillon Exp $ */ /* For 4.3 integer FS ID compatibility */ @@ -94,14 +94,6 @@ SYSCTL_INT(_vfs, OID_AUTO, usermount, CTLFLAG_RW, &usermount, 0, ""); /* * Mount a file system. */ -#ifndef _SYS_SYSPROTO_H_ -struct mount_args { - char *type; - char *path; - int flags; - caddr_t data; -}; -#endif /* * mount_args(char *type, char *path, int flags, caddr_t data) */ @@ -412,12 +404,6 @@ checkdirs(struct vnode *olddp) * Note: unmount takes a path to the vnode mounted on as argument, * not special file (as before). */ -#ifndef _SYS_SYSPROTO_H_ -struct unmount_args { - char *path; - int flags; -}; -#endif /* * umount_args(char *path, int flags) */ @@ -541,11 +527,6 @@ dounmount(struct mount *mp, int flags, struct thread *td) /* * Sync each mounted filesystem. */ -#ifndef _SYS_SYSPROTO_H_ -struct sync_args { - int dummy; -}; -#endif #ifdef DEBUG static int syncprt = 0; diff --git a/sys/platform/pc32/i386/exception.s b/sys/platform/pc32/i386/exception.s index e976400c93..76b40898c0 100644 --- a/sys/platform/pc32/i386/exception.s +++ b/sys/platform/pc32/i386/exception.s @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/i386/exception.s,v 1.65.2.3 2001/08/15 01:23:49 peter Exp $ - * $DragonFly: src/sys/platform/pc32/i386/exception.s,v 1.15 2003/07/19 17:00:33 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/exception.s,v 1.16 2003/07/24 01:41:16 dillon Exp $ */ #include "npx.h" @@ -271,7 +271,7 @@ IDTVEC(syscall) jmp doreti /* - * Call gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) + * Trap gate entry for FreeBSD ELF and Linux/NetBSD syscall (int 0x80) * * Even though the name says 'int0x80', this is actually a TGT (trap gate) * rather then an IGT (interrupt gate). Thus interrupts are enabled on @@ -294,7 +294,7 @@ IDTVEC(int0x80_syscall) mov %ax,%fs movl $2,TF_ERR(%esp) /* sizeof "int 0x80" */ FAKE_MCOUNT(13*4(%esp)) - incl PCPU(cnt)+V_SYSCALL /* YYY per-cpu */ + incl PCPU(cnt)+V_SYSCALL call syscall2 MEXITCOUNT cli /* atomic reqflags interlock w/irq */ @@ -304,6 +304,42 @@ IDTVEC(int0x80_syscall) movl $1,PCPU(intr_nesting_level) jmp doreti +#if 0 +/* + * Trap gate entry for FreeBSD syscall messaging interface (int 0x81). + * Arguments are passed in registers, the return value is placed in %eax. + * + * eax:error = int0x81(eax:port, ecx:msg, edx:msgsize) + * + * Performs message sending, message and port waiting, and flushing + * functinos. + */ + SUPERALIGN_TEXT +IDTVEC(int0x81_syscall) + subl $8,%esp /* skip over tf_trapno and tf_err */ + pushal + pushl %ds + pushl %es + pushl %fs + mov $KDSEL,%ax /* switch to kernel segments */ + mov %ax,%ds + mov %ax,%es + mov $KPSEL,%ax + mov %ax,%fs + /* note: tf_err is not used */ + FAKE_MCOUNT(13*4(%esp)) + incl PCPU(cnt)+V_SENDSYS + call sendsys2 + MEXITCOUNT + cli /* atomic reqflags interlock w/irq */ + cmpl $0,PCPU(reqflags) + je doreti_syscall_ret + pushl $0 /* cpl to restore */ + movl $1,PCPU(intr_nesting_level) + jmp doreti + +#endif + /* * This function is what cpu_heavy_restore jumps to after a new process * is created. The LWKT subsystem switches while holding a critical diff --git a/sys/platform/pc32/i386/genassym.c b/sys/platform/pc32/i386/genassym.c index 719f03c85f..83ee37f5f0 100644 --- a/sys/platform/pc32/i386/genassym.c +++ b/sys/platform/pc32/i386/genassym.c @@ -35,7 +35,7 @@ * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ - * $DragonFly: src/sys/platform/pc32/i386/genassym.c,v 1.26 2003/07/12 17:54:32 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/genassym.c,v 1.27 2003/07/24 01:41:16 dillon Exp $ */ #include "opt_user_ldt.h" @@ -108,6 +108,7 @@ ASSYM(SSLEEP, SSLEEP); ASSYM(SRUN, SRUN); ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap)); ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall)); +ASSYM(V_SENDSYS, offsetof(struct vmmeter, v_sendsys)); ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); ASSYM(V_FORWARDED_INTS, offsetof(struct vmmeter, v_forwarded_ints)); ASSYM(V_FORWARDED_HITS, offsetof(struct vmmeter, v_forwarded_hits)); diff --git a/sys/platform/pc32/i386/machdep.c b/sys/platform/pc32/i386/machdep.c index 001c19f5c0..460c42859d 100644 --- a/sys/platform/pc32/i386/machdep.c +++ b/sys/platform/pc32/i386/machdep.c @@ -36,7 +36,7 @@ * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.385.2.30 2003/05/31 08:48:05 alc Exp $ - * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.26 2003/07/11 17:42:08 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.27 2003/07/24 01:41:16 dillon Exp $ */ #include "apm.h" @@ -1378,7 +1378,9 @@ extern inthand_t IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot), IDTVEC(page), IDTVEC(mchk), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(align), - IDTVEC(xmm), IDTVEC(syscall), IDTVEC(int0x80_syscall); + IDTVEC(xmm), IDTVEC(syscall); +extern inthand_t + IDTVEC(int0x80_syscall), IDTVEC(int0x81_syscall); void sdtossd(sd, ssd) @@ -1962,6 +1964,10 @@ init386(int first) setidt(19, &IDTVEC(xmm), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYS386TGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); +#if 0 + setidt(0x81, &IDTVEC(int0x81_syscall), + SDT_SYS386TGT, SEL_UPL, GSEL(GCODE_SEL, SEL_KPL)); +#endif r_idt.rd_limit = sizeof(idt0) - 1; r_idt.rd_base = (int) idt; diff --git a/sys/platform/pc32/i386/trap.c b/sys/platform/pc32/i386/trap.c index c0c491c061..58f6136d9b 100644 --- a/sys/platform/pc32/i386/trap.c +++ b/sys/platform/pc32/i386/trap.c @@ -36,7 +36,7 @@ * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 * $FreeBSD: src/sys/i386/i386/trap.c,v 1.147.2.11 2003/02/27 19:09:59 luoqi Exp $ - * $DragonFly: src/sys/platform/pc32/i386/trap.c,v 1.25 2003/07/20 07:14:23 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/trap.c,v 1.26 2003/07/24 01:41:16 dillon Exp $ */ /* @@ -64,6 +64,8 @@ #ifdef KTRACE #include #endif +#include +#include #include #include @@ -104,6 +106,7 @@ int (*pmath_emulate) __P((struct trapframe *)); extern void trap __P((struct trapframe frame)); extern int trapwrite __P((unsigned addr)); extern void syscall2 __P((struct trapframe frame)); +extern void sendsys2 __P((struct trapframe frame)); static int trap_pfault __P((struct trapframe *, int, vm_offset_t)); static void trap_fatal __P((struct trapframe *, vm_offset_t)); @@ -1168,8 +1171,7 @@ int trapwrite(addr) * the current stack is allowed without having to hold MP lock. */ void -syscall2(frame) - struct trapframe frame; +syscall2(struct trapframe frame) { struct thread *td = curthread; struct proc *p = td->td_proc; @@ -1180,8 +1182,8 @@ syscall2(frame) u_quad_t sticks; int error; int narg; - int args[8]; u_int code; + union sysunion args; #ifdef DIAGNOSTIC if (ISPL(frame.tf_cs) != SEL_UPL) { @@ -1200,8 +1202,8 @@ syscall2(frame) * updated by the clock interrupt. Also use this opportunity * to lazy-raise our LWKT priority. */ - crit_enter(); userenter(); + crit_enter(); sticks = curthread->td_sticks; crit_exit(); @@ -1214,7 +1216,7 @@ syscall2(frame) /* * The prep code is not MP aware. */ - (*p->p_sysent->sv_prepsyscall)(&frame, args, &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(&frame, (int *)(&args.lmsg + 1), &code, ¶ms); } else { /* * Need to check if this is a 32 bit or 64 bit syscall. @@ -1250,10 +1252,10 @@ syscall2(frame) * copyin is MP aware, but the tracing code is not */ if (params && (i = narg * sizeof(int)) && - (error = copyin(params, (caddr_t)args, (u_int)i))) { + (error = copyin(params, (caddr_t)(&args.lmsg + 1), (u_int)i))) { #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(p->p_tracep, code, narg, args); + ktrsyscall(p->p_tracep, code, narg, (void *)(&args.lmsg + 1)); #endif goto bad; } @@ -1272,7 +1274,7 @@ syscall2(frame) #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) { - ktrsyscall(p->p_tracep, code, narg, args); + ktrsyscall(p->p_tracep, code, narg, (void *)(&args.lmsg + 1)); } #endif p->p_retval[0] = 0; @@ -1280,7 +1282,7 @@ syscall2(frame) STOPEVENT(p, S_SCE, narg); /* MP aware */ - error = (*callp->sy_call)(args); + error = (*callp->sy_call)(&args); /* * MP SAFE (we may or may not have the MP lock at this point) @@ -1357,6 +1359,155 @@ bad: #endif } +#if 0 /* work in progress */ + +/* + * sendsys2 - MP aware system message request C handler + */ +void +sendsys2(struct trapframe frame) +{ + struct thread *td = curthread; + struct proc *p = td->td_proc; + struct sysent *callp; + sysunion_t sysmsg; + u_quad_t sticks; + int error; + int narg; + u_int code; + int msgsize; + +#ifdef DIAGNOSTIC + if (ISPL(frame.tf_cs) != SEL_UPL) { + get_mplock(); + panic("syscall"); + /* NOT REACHED */ + } +#endif + +#ifdef SMP + KASSERT(curthread->td_mpcount == 0, ("badmpcount syscall from %p", (void *)frame.tf_eip)); + get_mplock(); +#endif + /* + * access non-atomic field from critical section. p_sticks is + * updated by the clock interrupt. Also use this opportunity + * to lazy-raise our LWKT priority. + */ + userenter(); + crit_enter(); + sticks = curthread->td_sticks; + crit_exit(); + + p->p_md.md_regs = &frame; + + /* + * Extract the system call message. If msgsize is zero we are + * blocking on a message and/or message port. + */ + if ((msgsize = frame.tf_edx) == 0) { + ... handle waiting ... + } + + /* + * Bad message size + */ + if (msgsize < 0 || msgsize > sizeof(*sysmsg)) { + error = ENOSYS; + goto bad; + } + + /* + * Obtain a sysunion structure from our per-cpu cache or allocate + * one. This per-cpu cache may be accessed by interrupts returning + * a message. + */ + crit_enter(); + if ((sysmsg = TAILQ_FIRST(&mycpu->gd_sysmsgq)) != NULL) { + TAILQ_REMOVE(&mycpu->gd_sysmsgq, sysmsg, lmsg.ms_node); + crit_exit(); + } else { + crit_exit(); + sysmsg = malloc(sizeof(*sysmsg), M_SYSMSG, M_WAITOK); + } + umsg = (void *)frame.tf_ecx; + if ((error = copyin(umsg, sysmsg, msgsize)) != 0) + goto bad; + + code = sysmsg->lmsg.ms_cmd; + + if (code >= p->p_sysent->sv_size) { + error = ENOSYS; + goto bad; + } + + callp = &p->p_sysent->sv_table[code]; + +#ifdef KTRACE + if (KTRPOINT(td, KTR_SYSCALL)) { + ktrsyscall(p->p_tracep, code, narg, (void *)(&args + 1)); + } +#endif + p->p_retval[0] = 0; + p->p_retval[1] = 0; + + STOPEVENT(p, S_SCE, narg); /* MP aware */ + + /* + * Make the system call. An error code is always returned, results + * are copied back via ms_result32 or ms_result64. + * + * NOTE! XXX if this is a child returning from a fork curproc + * might be different. + */ + error = (*callp->sy_call)(sysmsg); + + /* + * If a synchronous return copy p_retval to ms_result64. + */ + if (error != EASYNC) { + error = copyout(p->p_retval, &umsg->ms_result64, sizeof(umsg->ms_result64)); + } + frame.tf_eax = error; + + /* + * Traced syscall. trapsignal() is not MP aware. + */ + if ((orig_tf_eflags & PSL_T) && !(orig_tf_eflags & PSL_VM)) { + frame.tf_eflags &= ~PSL_T; + trapsignal(p, SIGTRAP, 0); + } + + /* + * Handle reschedule and other end-of-syscall issues + */ + userret(p, &frame, sticks); + +#ifdef KTRACE + if (KTRPOINT(td, KTR_SYSRET)) { + ktrsysret(p->p_tracep, code, error, p->p_retval[0]); + } +#endif + + /* + * This works because errno is findable through the + * register set. If we ever support an emulation where this + * is not the case, this code will need to be revisited. + */ + STOPEVENT(p, S_SCX, code); + + userexit(p); +#ifdef SMP + /* + * Release the MP lock if we had to get it + */ + KASSERT(curthread->td_mpcount == 1, ("badmpcount syscall from %p", (void *)frame.tf_eip)); + rel_mplock(); +#endif +} + +#endif + /* * Simplified back end of syscall(), used when returning from fork() * directly into user mode. MP lock is held on entry and should be diff --git a/sys/platform/vkernel/i386/genassym.c b/sys/platform/vkernel/i386/genassym.c index 7e7ffa851f..804b850a4a 100644 --- a/sys/platform/vkernel/i386/genassym.c +++ b/sys/platform/vkernel/i386/genassym.c @@ -35,7 +35,7 @@ * * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ - * $DragonFly: src/sys/platform/vkernel/i386/genassym.c,v 1.26 2003/07/12 17:54:32 dillon Exp $ + * $DragonFly: src/sys/platform/vkernel/i386/genassym.c,v 1.27 2003/07/24 01:41:16 dillon Exp $ */ #include "opt_user_ldt.h" @@ -108,6 +108,7 @@ ASSYM(SSLEEP, SSLEEP); ASSYM(SRUN, SRUN); ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap)); ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall)); +ASSYM(V_SENDSYS, offsetof(struct vmmeter, v_sendsys)); ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); ASSYM(V_FORWARDED_INTS, offsetof(struct vmmeter, v_forwarded_ints)); ASSYM(V_FORWARDED_HITS, offsetof(struct vmmeter, v_forwarded_hits)); diff --git a/sys/sys/msgport.h b/sys/sys/msgport.h index a38c6e8bca..720add01e9 100644 --- a/sys/sys/msgport.h +++ b/sys/sys/msgport.h @@ -3,7 +3,7 @@ * * Implements LWKT messages and ports. * - * $DragonFly: src/sys/sys/msgport.h,v 1.2 2003/07/22 17:03:34 dillon Exp $ + * $DragonFly: src/sys/sys/msgport.h,v 1.3 2003/07/24 01:41:27 dillon Exp $ */ #ifndef _SYS_MSGPORT_H_ @@ -26,6 +26,8 @@ typedef TAILQ_HEAD(lwkt_msg_queue, lwkt_msg) lwkt_msg_queue; * The standard message and port structure for communications between * threads. See kern/lwkt_msgport.c for documentation on how messages and * ports work. + * + * NOTE! 64-bit-align this structure. */ typedef struct lwkt_msg { TAILQ_ENTRY(lwkt_msg) ms_node; /* link node (not always used) */ @@ -35,6 +37,12 @@ typedef struct lwkt_msg { int ms_cmd; int ms_flags; int ms_error; + union { + void *ms_resultp; + int32_t ms_result32; + int64_t ms_result64; + } u; + int ms_pad[2]; /* future use */ } lwkt_msg; #define MSGF_DONE 0x0001 /* asynch message is complete */ diff --git a/sys/sys/syscall-hide.h b/sys/sys/syscall-hide.h index dd2e000365..1260105e91 100644 --- a/sys/sys/syscall-hide.h +++ b/sys/sys/syscall-hide.h @@ -2,8 +2,8 @@ * System call hiders. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/syscall-hide.h,v 1.3 2003/06/23 17:55:50 dillon Exp $ - * created from TurtleBSD: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp + * $DragonFly: src/sys/sys/syscall-hide.h,v 1.4 2003/07/24 01:41:27 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ HIDE_POSIX(fork) diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index a31edc8082..432f45a94f 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/syscall.h,v 1.3 2003/06/23 17:55:50 dillon Exp $ - * created from TurtleBSD: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp + * $DragonFly: src/sys/sys/syscall.h,v 1.4 2003/07/24 01:41:27 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ #define SYS_syscall 0 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 05c1ef791b..e24c1f9df3 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -1,7 +1,7 @@ -# TurtleBSD system call names. +# DragonFly system call names. # DO NOT EDIT-- this file is automatically generated. -# $DragonFly: src/sys/sys/syscall.mk,v 1.3 2003/06/23 17:55:50 dillon Exp $ -# created from TurtleBSD: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp +# $DragonFly: src/sys/sys/syscall.mk,v 1.4 2003/07/24 01:41:27 dillon Exp $ +# created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp MIASM = \ syscall.o \ exit.o \ diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 2551873e40..151f9a0e22 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/sysproto.h,v 1.3 2003/06/23 17:55:50 dillon Exp $ - * created from TurtleBSD: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp + * $DragonFly: src/sys/sys/sysproto.h,v 1.4 2003/07/24 01:41:27 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ #ifndef _SYS_SYSPROTO_H_ @@ -13,116 +13,145 @@ #include +#include + #define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ 0 : sizeof(register_t) - sizeof(t)) struct nosys_args { + struct lwkt_msg lmsg; register_t dummy; }; struct sys_exit_args { + struct lwkt_msg lmsg; int rval; char rval_[PAD_(int)]; }; struct fork_args { + struct lwkt_msg lmsg; register_t dummy; }; struct read_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; void * buf; char buf_[PAD_(void *)]; size_t nbyte; char nbyte_[PAD_(size_t)]; }; struct write_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; const void * buf; char buf_[PAD_(const void *)]; size_t nbyte; char nbyte_[PAD_(size_t)]; }; struct open_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct close_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; }; struct wait_args { + struct lwkt_msg lmsg; int pid; char pid_[PAD_(int)]; int * status; char status_[PAD_(int *)]; int options; char options_[PAD_(int)]; struct rusage * rusage; char rusage_[PAD_(struct rusage *)]; }; struct link_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char * link; char link_[PAD_(char *)]; }; struct unlink_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct chdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct fchdir_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; }; struct mknod_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; int dev; char dev_[PAD_(int)]; }; struct chmod_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct chown_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int uid; char uid_[PAD_(int)]; int gid; char gid_[PAD_(int)]; }; struct obreak_args { + struct lwkt_msg lmsg; char * nsize; char nsize_[PAD_(char *)]; }; struct getfsstat_args { + struct lwkt_msg lmsg; struct statfs * buf; char buf_[PAD_(struct statfs *)]; long bufsize; char bufsize_[PAD_(long)]; int flags; char flags_[PAD_(int)]; }; struct getpid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct mount_args { + struct lwkt_msg lmsg; char * type; char type_[PAD_(char *)]; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; caddr_t data; char data_[PAD_(caddr_t)]; }; struct unmount_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct setuid_args { + struct lwkt_msg lmsg; uid_t uid; char uid_[PAD_(uid_t)]; }; struct getuid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct geteuid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct ptrace_args { + struct lwkt_msg lmsg; int req; char req_[PAD_(int)]; pid_t pid; char pid_[PAD_(pid_t)]; caddr_t addr; char addr_[PAD_(caddr_t)]; int data; char data_[PAD_(int)]; }; struct recvmsg_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; struct msghdr * msg; char msg_[PAD_(struct msghdr *)]; int flags; char flags_[PAD_(int)]; }; struct sendmsg_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t msg; char msg_[PAD_(caddr_t)]; int flags; char flags_[PAD_(int)]; }; struct recvfrom_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t buf; char buf_[PAD_(caddr_t)]; size_t len; char len_[PAD_(size_t)]; @@ -131,196 +160,246 @@ struct recvfrom_args { int * fromlenaddr; char fromlenaddr_[PAD_(int *)]; }; struct accept_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t name; char name_[PAD_(caddr_t)]; int * anamelen; char anamelen_[PAD_(int *)]; }; struct getpeername_args { + struct lwkt_msg lmsg; int fdes; char fdes_[PAD_(int)]; caddr_t asa; char asa_[PAD_(caddr_t)]; int * alen; char alen_[PAD_(int *)]; }; struct getsockname_args { + struct lwkt_msg lmsg; int fdes; char fdes_[PAD_(int)]; caddr_t asa; char asa_[PAD_(caddr_t)]; int * alen; char alen_[PAD_(int *)]; }; struct access_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct chflags_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct fchflags_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int flags; char flags_[PAD_(int)]; }; struct sync_args { + struct lwkt_msg lmsg; register_t dummy; }; struct kill_args { + struct lwkt_msg lmsg; int pid; char pid_[PAD_(int)]; int signum; char signum_[PAD_(int)]; }; struct getppid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct dup_args { + struct lwkt_msg lmsg; u_int fd; char fd_[PAD_(u_int)]; }; struct pipe_args { + struct lwkt_msg lmsg; register_t dummy; }; struct getegid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct profil_args { + struct lwkt_msg lmsg; caddr_t samples; char samples_[PAD_(caddr_t)]; size_t size; char size_[PAD_(size_t)]; size_t offset; char offset_[PAD_(size_t)]; u_int scale; char scale_[PAD_(u_int)]; }; struct ktrace_args { + struct lwkt_msg lmsg; const char * fname; char fname_[PAD_(const char *)]; int ops; char ops_[PAD_(int)]; int facs; char facs_[PAD_(int)]; int pid; char pid_[PAD_(int)]; }; struct getgid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct getlogin_args { + struct lwkt_msg lmsg; char * namebuf; char namebuf_[PAD_(char *)]; u_int namelen; char namelen_[PAD_(u_int)]; }; struct setlogin_args { + struct lwkt_msg lmsg; char * namebuf; char namebuf_[PAD_(char *)]; }; struct acct_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct osigpending_args { + struct lwkt_msg lmsg; register_t dummy; }; struct sigaltstack_args { + struct lwkt_msg lmsg; stack_t * ss; char ss_[PAD_(stack_t *)]; stack_t * oss; char oss_[PAD_(stack_t *)]; }; struct ioctl_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; u_long com; char com_[PAD_(u_long)]; caddr_t data; char data_[PAD_(caddr_t)]; }; struct reboot_args { + struct lwkt_msg lmsg; int opt; char opt_[PAD_(int)]; }; struct revoke_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct symlink_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char * link; char link_[PAD_(char *)]; }; struct readlink_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; char * buf; char buf_[PAD_(char *)]; int count; char count_[PAD_(int)]; }; struct execve_args { + struct lwkt_msg lmsg; char * fname; char fname_[PAD_(char *)]; char ** argv; char argv_[PAD_(char **)]; char ** envv; char envv_[PAD_(char **)]; }; struct umask_args { + struct lwkt_msg lmsg; int newmask; char newmask_[PAD_(int)]; }; struct chroot_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct getpagesize_args { + struct lwkt_msg lmsg; register_t dummy; }; struct msync_args { + struct lwkt_msg lmsg; void * addr; char addr_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; int flags; char flags_[PAD_(int)]; }; struct vfork_args { + struct lwkt_msg lmsg; register_t dummy; }; struct sbrk_args { + struct lwkt_msg lmsg; int incr; char incr_[PAD_(int)]; }; struct sstk_args { + struct lwkt_msg lmsg; int incr; char incr_[PAD_(int)]; }; struct ovadvise_args { + struct lwkt_msg lmsg; int anom; char anom_[PAD_(int)]; }; struct munmap_args { + struct lwkt_msg lmsg; void * addr; char addr_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; }; struct mprotect_args { + struct lwkt_msg lmsg; const void * addr; char addr_[PAD_(const void *)]; size_t len; char len_[PAD_(size_t)]; int prot; char prot_[PAD_(int)]; }; struct madvise_args { + struct lwkt_msg lmsg; void * addr; char addr_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; int behav; char behav_[PAD_(int)]; }; struct mincore_args { + struct lwkt_msg lmsg; const void * addr; char addr_[PAD_(const void *)]; size_t len; char len_[PAD_(size_t)]; char * vec; char vec_[PAD_(char *)]; }; struct getgroups_args { + struct lwkt_msg lmsg; u_int gidsetsize; char gidsetsize_[PAD_(u_int)]; gid_t * gidset; char gidset_[PAD_(gid_t *)]; }; struct setgroups_args { + struct lwkt_msg lmsg; u_int gidsetsize; char gidsetsize_[PAD_(u_int)]; gid_t * gidset; char gidset_[PAD_(gid_t *)]; }; struct getpgrp_args { + struct lwkt_msg lmsg; register_t dummy; }; struct setpgid_args { + struct lwkt_msg lmsg; int pid; char pid_[PAD_(int)]; int pgid; char pgid_[PAD_(int)]; }; struct setitimer_args { + struct lwkt_msg lmsg; u_int which; char which_[PAD_(u_int)]; struct itimerval * itv; char itv_[PAD_(struct itimerval *)]; struct itimerval * oitv; char oitv_[PAD_(struct itimerval *)]; }; struct owait_args { + struct lwkt_msg lmsg; register_t dummy; }; struct swapon_args { + struct lwkt_msg lmsg; char * name; char name_[PAD_(char *)]; }; struct getitimer_args { + struct lwkt_msg lmsg; u_int which; char which_[PAD_(u_int)]; struct itimerval * itv; char itv_[PAD_(struct itimerval *)]; }; struct getdtablesize_args { + struct lwkt_msg lmsg; register_t dummy; }; struct dup2_args { + struct lwkt_msg lmsg; u_int from; char from_[PAD_(u_int)]; u_int to; char to_[PAD_(u_int)]; }; struct fcntl_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; long arg; char arg_[PAD_(long)]; }; struct select_args { + struct lwkt_msg lmsg; int nd; char nd_[PAD_(int)]; fd_set * in; char in_[PAD_(fd_set *)]; fd_set * ou; char ou_[PAD_(fd_set *)]; @@ -328,33 +407,40 @@ struct select_args { struct timeval * tv; char tv_[PAD_(struct timeval *)]; }; struct fsync_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; }; struct setpriority_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; int who; char who_[PAD_(int)]; int prio; char prio_[PAD_(int)]; }; struct socket_args { + struct lwkt_msg lmsg; int domain; char domain_[PAD_(int)]; int type; char type_[PAD_(int)]; int protocol; char protocol_[PAD_(int)]; }; struct connect_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t name; char name_[PAD_(caddr_t)]; int namelen; char namelen_[PAD_(int)]; }; struct getpriority_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; int who; char who_[PAD_(int)]; }; struct bind_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t name; char name_[PAD_(caddr_t)]; int namelen; char namelen_[PAD_(int)]; }; struct setsockopt_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; int level; char level_[PAD_(int)]; int name; char name_[PAD_(int)]; @@ -362,18 +448,22 @@ struct setsockopt_args { int valsize; char valsize_[PAD_(int)]; }; struct listen_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; int backlog; char backlog_[PAD_(int)]; }; struct gettimeofday_args { + struct lwkt_msg lmsg; struct timeval * tp; char tp_[PAD_(struct timeval *)]; struct timezone * tzp; char tzp_[PAD_(struct timezone *)]; }; struct getrusage_args { + struct lwkt_msg lmsg; int who; char who_[PAD_(int)]; struct rusage * rusage; char rusage_[PAD_(struct rusage *)]; }; struct getsockopt_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; int level; char level_[PAD_(int)]; int name; char name_[PAD_(int)]; @@ -381,49 +471,60 @@ struct getsockopt_args { int * avalsize; char avalsize_[PAD_(int *)]; }; struct readv_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct iovec * iovp; char iovp_[PAD_(struct iovec *)]; u_int iovcnt; char iovcnt_[PAD_(u_int)]; }; struct writev_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct iovec * iovp; char iovp_[PAD_(struct iovec *)]; u_int iovcnt; char iovcnt_[PAD_(u_int)]; }; struct settimeofday_args { + struct lwkt_msg lmsg; struct timeval * tv; char tv_[PAD_(struct timeval *)]; struct timezone * tzp; char tzp_[PAD_(struct timezone *)]; }; struct fchown_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int uid; char uid_[PAD_(int)]; int gid; char gid_[PAD_(int)]; }; struct fchmod_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct setreuid_args { + struct lwkt_msg lmsg; int ruid; char ruid_[PAD_(int)]; int euid; char euid_[PAD_(int)]; }; struct setregid_args { + struct lwkt_msg lmsg; int rgid; char rgid_[PAD_(int)]; int egid; char egid_[PAD_(int)]; }; struct rename_args { + struct lwkt_msg lmsg; char * from; char from_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct flock_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int how; char how_[PAD_(int)]; }; struct mkfifo_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct sendto_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t buf; char buf_[PAD_(caddr_t)]; size_t len; char len_[PAD_(size_t)]; @@ -432,82 +533,102 @@ struct sendto_args { int tolen; char tolen_[PAD_(int)]; }; struct shutdown_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; int how; char how_[PAD_(int)]; }; struct socketpair_args { + struct lwkt_msg lmsg; int domain; char domain_[PAD_(int)]; int type; char type_[PAD_(int)]; int protocol; char protocol_[PAD_(int)]; int * rsv; char rsv_[PAD_(int *)]; }; struct mkdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct rmdir_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct utimes_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct adjtime_args { + struct lwkt_msg lmsg; struct timeval * delta; char delta_[PAD_(struct timeval *)]; struct timeval * olddelta; char olddelta_[PAD_(struct timeval *)]; }; struct ogethostid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct setsid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct quotactl_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int cmd; char cmd_[PAD_(int)]; int uid; char uid_[PAD_(int)]; caddr_t arg; char arg_[PAD_(caddr_t)]; }; struct oquota_args { + struct lwkt_msg lmsg; register_t dummy; }; struct nfssvc_args { + struct lwkt_msg lmsg; int flag; char flag_[PAD_(int)]; caddr_t argp; char argp_[PAD_(caddr_t)]; }; struct statfs_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct statfs * buf; char buf_[PAD_(struct statfs *)]; }; struct fstatfs_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct statfs * buf; char buf_[PAD_(struct statfs *)]; }; struct getfh_args { + struct lwkt_msg lmsg; char * fname; char fname_[PAD_(char *)]; struct fhandle * fhp; char fhp_[PAD_(struct fhandle *)]; }; struct getdomainname_args { + struct lwkt_msg lmsg; char * domainname; char domainname_[PAD_(char *)]; int len; char len_[PAD_(int)]; }; struct setdomainname_args { + struct lwkt_msg lmsg; char * domainname; char domainname_[PAD_(char *)]; int len; char len_[PAD_(int)]; }; struct uname_args { + struct lwkt_msg lmsg; struct utsname * name; char name_[PAD_(struct utsname *)]; }; struct sysarch_args { + struct lwkt_msg lmsg; int op; char op_[PAD_(int)]; char * parms; char parms_[PAD_(char *)]; }; struct rtprio_args { + struct lwkt_msg lmsg; int function; char function_[PAD_(int)]; pid_t pid; char pid_[PAD_(pid_t)]; struct rtprio * rtp; char rtp_[PAD_(struct rtprio *)]; }; struct semsys_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -515,6 +636,7 @@ struct semsys_args { int a5; char a5_[PAD_(int)]; }; struct msgsys_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -523,12 +645,14 @@ struct msgsys_args { int a6; char a6_[PAD_(int)]; }; struct shmsys_args { + struct lwkt_msg lmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; int a4; char a4_[PAD_(int)]; }; struct pread_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; void * buf; char buf_[PAD_(void *)]; size_t nbyte; char nbyte_[PAD_(size_t)]; @@ -536,6 +660,7 @@ struct pread_args { off_t offset; char offset_[PAD_(off_t)]; }; struct pwrite_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; const void * buf; char buf_[PAD_(const void *)]; size_t nbyte; char nbyte_[PAD_(size_t)]; @@ -543,52 +668,65 @@ struct pwrite_args { off_t offset; char offset_[PAD_(off_t)]; }; struct ntp_adjtime_args { + struct lwkt_msg lmsg; struct timex * tp; char tp_[PAD_(struct timex *)]; }; struct setgid_args { + struct lwkt_msg lmsg; gid_t gid; char gid_[PAD_(gid_t)]; }; struct setegid_args { + struct lwkt_msg lmsg; gid_t egid; char egid_[PAD_(gid_t)]; }; struct seteuid_args { + struct lwkt_msg lmsg; uid_t euid; char euid_[PAD_(uid_t)]; }; struct stat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct stat * ub; char ub_[PAD_(struct stat *)]; }; struct fstat_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct stat * sb; char sb_[PAD_(struct stat *)]; }; struct lstat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct stat * ub; char ub_[PAD_(struct stat *)]; }; struct pathconf_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int name; char name_[PAD_(int)]; }; struct fpathconf_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int name; char name_[PAD_(int)]; }; struct __getrlimit_args { + struct lwkt_msg lmsg; u_int which; char which_[PAD_(u_int)]; struct rlimit * rlp; char rlp_[PAD_(struct rlimit *)]; }; struct __setrlimit_args { + struct lwkt_msg lmsg; u_int which; char which_[PAD_(u_int)]; struct rlimit * rlp; char rlp_[PAD_(struct rlimit *)]; }; struct getdirentries_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; u_int count; char count_[PAD_(u_int)]; long * basep; char basep_[PAD_(long *)]; }; struct mmap_args { + struct lwkt_msg lmsg; caddr_t addr; char addr_[PAD_(caddr_t)]; size_t len; char len_[PAD_(size_t)]; int prot; char prot_[PAD_(int)]; @@ -598,22 +736,26 @@ struct mmap_args { off_t pos; char pos_[PAD_(off_t)]; }; struct lseek_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int pad; char pad_[PAD_(int)]; off_t offset; char offset_[PAD_(off_t)]; int whence; char whence_[PAD_(int)]; }; struct truncate_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int pad; char pad_[PAD_(int)]; off_t length; char length_[PAD_(off_t)]; }; struct ftruncate_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int pad; char pad_[PAD_(int)]; off_t length; char length_[PAD_(off_t)]; }; struct sysctl_args { + struct lwkt_msg lmsg; int * name; char name_[PAD_(int *)]; u_int namelen; char namelen_[PAD_(u_int)]; void * old; char old_[PAD_(void *)]; @@ -622,60 +764,73 @@ struct sysctl_args { size_t newlen; char newlen_[PAD_(size_t)]; }; struct mlock_args { + struct lwkt_msg lmsg; const void * addr; char addr_[PAD_(const void *)]; size_t len; char len_[PAD_(size_t)]; }; struct munlock_args { + struct lwkt_msg lmsg; const void * addr; char addr_[PAD_(const void *)]; size_t len; char len_[PAD_(size_t)]; }; struct undelete_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; }; struct futimes_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct getpgid_args { + struct lwkt_msg lmsg; pid_t pid; char pid_[PAD_(pid_t)]; }; struct poll_args { + struct lwkt_msg lmsg; struct pollfd * fds; char fds_[PAD_(struct pollfd *)]; u_int nfds; char nfds_[PAD_(u_int)]; int timeout; char timeout_[PAD_(int)]; }; struct __semctl_args { + struct lwkt_msg lmsg; int semid; char semid_[PAD_(int)]; int semnum; char semnum_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; union semun * arg; char arg_[PAD_(union semun *)]; }; struct semget_args { + struct lwkt_msg lmsg; key_t key; char key_[PAD_(key_t)]; int nsems; char nsems_[PAD_(int)]; int semflg; char semflg_[PAD_(int)]; }; struct semop_args { + struct lwkt_msg lmsg; int semid; char semid_[PAD_(int)]; struct sembuf * sops; char sops_[PAD_(struct sembuf *)]; u_int nsops; char nsops_[PAD_(u_int)]; }; struct msgctl_args { + struct lwkt_msg lmsg; int msqid; char msqid_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; struct msqid_ds * buf; char buf_[PAD_(struct msqid_ds *)]; }; struct msgget_args { + struct lwkt_msg lmsg; key_t key; char key_[PAD_(key_t)]; int msgflg; char msgflg_[PAD_(int)]; }; struct msgsnd_args { + struct lwkt_msg lmsg; int msqid; char msqid_[PAD_(int)]; void * msgp; char msgp_[PAD_(void *)]; size_t msgsz; char msgsz_[PAD_(size_t)]; int msgflg; char msgflg_[PAD_(int)]; }; struct msgrcv_args { + struct lwkt_msg lmsg; int msqid; char msqid_[PAD_(int)]; void * msgp; char msgp_[PAD_(void *)]; size_t msgsz; char msgsz_[PAD_(size_t)]; @@ -683,326 +838,407 @@ struct msgrcv_args { int msgflg; char msgflg_[PAD_(int)]; }; struct shmat_args { + struct lwkt_msg lmsg; int shmid; char shmid_[PAD_(int)]; void * shmaddr; char shmaddr_[PAD_(void *)]; int shmflg; char shmflg_[PAD_(int)]; }; struct shmctl_args { + struct lwkt_msg lmsg; int shmid; char shmid_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; struct shmid_ds * buf; char buf_[PAD_(struct shmid_ds *)]; }; struct shmdt_args { + struct lwkt_msg lmsg; void * shmaddr; char shmaddr_[PAD_(void *)]; }; struct shmget_args { + struct lwkt_msg lmsg; key_t key; char key_[PAD_(key_t)]; int size; char size_[PAD_(int)]; int shmflg; char shmflg_[PAD_(int)]; }; struct clock_gettime_args { + struct lwkt_msg lmsg; clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; struct timespec * tp; char tp_[PAD_(struct timespec *)]; }; struct clock_settime_args { + struct lwkt_msg lmsg; clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; const struct timespec * tp; char tp_[PAD_(const struct timespec *)]; }; struct clock_getres_args { + struct lwkt_msg lmsg; clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; struct timespec * tp; char tp_[PAD_(struct timespec *)]; }; struct nanosleep_args { + struct lwkt_msg lmsg; const struct timespec * rqtp; char rqtp_[PAD_(const struct timespec *)]; struct timespec * rmtp; char rmtp_[PAD_(struct timespec *)]; }; struct minherit_args { + struct lwkt_msg lmsg; void * addr; char addr_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; int inherit; char inherit_[PAD_(int)]; }; struct rfork_args { + struct lwkt_msg lmsg; int flags; char flags_[PAD_(int)]; }; struct openbsd_poll_args { + struct lwkt_msg lmsg; struct pollfd * fds; char fds_[PAD_(struct pollfd *)]; u_int nfds; char nfds_[PAD_(u_int)]; int timeout; char timeout_[PAD_(int)]; }; struct issetugid_args { + struct lwkt_msg lmsg; register_t dummy; }; struct lchown_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int uid; char uid_[PAD_(int)]; int gid; char gid_[PAD_(int)]; }; struct getdents_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; size_t count; char count_[PAD_(size_t)]; }; struct lchmod_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; mode_t mode; char mode_[PAD_(mode_t)]; }; struct lutimes_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct nstat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct nstat * ub; char ub_[PAD_(struct nstat *)]; }; struct nfstat_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct nstat * sb; char sb_[PAD_(struct nstat *)]; }; struct nlstat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct nstat * ub; char ub_[PAD_(struct nstat *)]; }; struct fhstatfs_args { + struct lwkt_msg lmsg; const struct fhandle * u_fhp; char u_fhp_[PAD_(const struct fhandle *)]; struct statfs * buf; char buf_[PAD_(struct statfs *)]; }; struct fhopen_args { + struct lwkt_msg lmsg; const struct fhandle * u_fhp; char u_fhp_[PAD_(const struct fhandle *)]; int flags; char flags_[PAD_(int)]; }; struct fhstat_args { + struct lwkt_msg lmsg; const struct fhandle * u_fhp; char u_fhp_[PAD_(const struct fhandle *)]; struct stat * sb; char sb_[PAD_(struct stat *)]; }; struct modnext_args { + struct lwkt_msg lmsg; int modid; char modid_[PAD_(int)]; }; struct modstat_args { + struct lwkt_msg lmsg; int modid; char modid_[PAD_(int)]; struct module_stat * stat; char stat_[PAD_(struct module_stat *)]; }; struct modfnext_args { + struct lwkt_msg lmsg; int modid; char modid_[PAD_(int)]; }; struct modfind_args { + struct lwkt_msg lmsg; const char * name; char name_[PAD_(const char *)]; }; struct kldload_args { + struct lwkt_msg lmsg; const char * file; char file_[PAD_(const char *)]; }; struct kldunload_args { + struct lwkt_msg lmsg; int fileid; char fileid_[PAD_(int)]; }; struct kldfind_args { + struct lwkt_msg lmsg; const char * file; char file_[PAD_(const char *)]; }; struct kldnext_args { + struct lwkt_msg lmsg; int fileid; char fileid_[PAD_(int)]; }; struct kldstat_args { + struct lwkt_msg lmsg; int fileid; char fileid_[PAD_(int)]; struct kld_file_stat * stat; char stat_[PAD_(struct kld_file_stat *)]; }; struct kldfirstmod_args { + struct lwkt_msg lmsg; int fileid; char fileid_[PAD_(int)]; }; struct getsid_args { + struct lwkt_msg lmsg; pid_t pid; char pid_[PAD_(pid_t)]; }; struct setresuid_args { + struct lwkt_msg lmsg; uid_t ruid; char ruid_[PAD_(uid_t)]; uid_t euid; char euid_[PAD_(uid_t)]; uid_t suid; char suid_[PAD_(uid_t)]; }; struct setresgid_args { + struct lwkt_msg lmsg; gid_t rgid; char rgid_[PAD_(gid_t)]; gid_t egid; char egid_[PAD_(gid_t)]; gid_t sgid; char sgid_[PAD_(gid_t)]; }; struct aio_return_args { + struct lwkt_msg lmsg; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_suspend_args { + struct lwkt_msg lmsg; struct aiocb *const * aiocbp; char aiocbp_[PAD_(struct aiocb *const *)]; int nent; char nent_[PAD_(int)]; const struct timespec * timeout; char timeout_[PAD_(const struct timespec *)]; }; struct aio_cancel_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_error_args { + struct lwkt_msg lmsg; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_read_args { + struct lwkt_msg lmsg; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_write_args { + struct lwkt_msg lmsg; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct lio_listio_args { + struct lwkt_msg lmsg; int mode; char mode_[PAD_(int)]; struct aiocb *const * acb_list; char acb_list_[PAD_(struct aiocb *const *)]; int nent; char nent_[PAD_(int)]; struct sigevent * sig; char sig_[PAD_(struct sigevent *)]; }; struct yield_args { + struct lwkt_msg lmsg; register_t dummy; }; struct thr_sleep_args { + struct lwkt_msg lmsg; const struct timespec * timeout; char timeout_[PAD_(const struct timespec *)]; }; struct thr_wakeup_args { + struct lwkt_msg lmsg; pid_t pid; char pid_[PAD_(pid_t)]; }; struct mlockall_args { + struct lwkt_msg lmsg; int how; char how_[PAD_(int)]; }; struct munlockall_args { + struct lwkt_msg lmsg; register_t dummy; }; struct __getcwd_args { + struct lwkt_msg lmsg; u_char * buf; char buf_[PAD_(u_char *)]; u_int buflen; char buflen_[PAD_(u_int)]; }; struct sched_setparam_args { + struct lwkt_msg lmsg; pid_t pid; char pid_[PAD_(pid_t)]; const struct sched_param * param; char param_[PAD_(const struct sched_param *)]; }; struct sched_getparam_args { + struct lwkt_msg lmsg; pid_t pid; char pid_[PAD_(pid_t)]; struct sched_param * param; char param_[PAD_(struct sched_param *)]; }; struct sched_setscheduler_args { + struct lwkt_msg lmsg; pid_t pid; char pid_[PAD_(pid_t)]; int policy; char policy_[PAD_(int)]; const struct sched_param * param; char param_[PAD_(const struct sched_param *)]; }; struct sched_getscheduler_args { + struct lwkt_msg lmsg; pid_t pid; char pid_[PAD_(pid_t)]; }; struct sched_yield_args { + struct lwkt_msg lmsg; register_t dummy; }; struct sched_get_priority_max_args { + struct lwkt_msg lmsg; int policy; char policy_[PAD_(int)]; }; struct sched_get_priority_min_args { + struct lwkt_msg lmsg; int policy; char policy_[PAD_(int)]; }; struct sched_rr_get_interval_args { + struct lwkt_msg lmsg; pid_t pid; char pid_[PAD_(pid_t)]; struct timespec * interval; char interval_[PAD_(struct timespec *)]; }; struct utrace_args { + struct lwkt_msg lmsg; const void * addr; char addr_[PAD_(const void *)]; size_t len; char len_[PAD_(size_t)]; }; struct kldsym_args { + struct lwkt_msg lmsg; int fileid; char fileid_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; void * data; char data_[PAD_(void *)]; }; struct jail_args { + struct lwkt_msg lmsg; struct jail * jail; char jail_[PAD_(struct jail *)]; }; struct sigprocmask_args { + struct lwkt_msg lmsg; int how; char how_[PAD_(int)]; const sigset_t * set; char set_[PAD_(const sigset_t *)]; sigset_t * oset; char oset_[PAD_(sigset_t *)]; }; struct sigsuspend_args { + struct lwkt_msg lmsg; const sigset_t * sigmask; char sigmask_[PAD_(const sigset_t *)]; }; struct sigaction_args { + struct lwkt_msg lmsg; int sig; char sig_[PAD_(int)]; const struct sigaction * act; char act_[PAD_(const struct sigaction *)]; struct sigaction * oact; char oact_[PAD_(struct sigaction *)]; }; struct sigpending_args { + struct lwkt_msg lmsg; sigset_t * set; char set_[PAD_(sigset_t *)]; }; struct sigreturn_args { + struct lwkt_msg lmsg; ucontext_t * sigcntxp; char sigcntxp_[PAD_(ucontext_t *)]; }; struct __acl_get_file_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; acl_type_t type; char type_[PAD_(acl_type_t)]; struct acl * aclp; char aclp_[PAD_(struct acl *)]; }; struct __acl_set_file_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; acl_type_t type; char type_[PAD_(acl_type_t)]; struct acl * aclp; char aclp_[PAD_(struct acl *)]; }; struct __acl_get_fd_args { + struct lwkt_msg lmsg; int filedes; char filedes_[PAD_(int)]; acl_type_t type; char type_[PAD_(acl_type_t)]; struct acl * aclp; char aclp_[PAD_(struct acl *)]; }; struct __acl_set_fd_args { + struct lwkt_msg lmsg; int filedes; char filedes_[PAD_(int)]; acl_type_t type; char type_[PAD_(acl_type_t)]; struct acl * aclp; char aclp_[PAD_(struct acl *)]; }; struct __acl_delete_file_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; acl_type_t type; char type_[PAD_(acl_type_t)]; }; struct __acl_delete_fd_args { + struct lwkt_msg lmsg; int filedes; char filedes_[PAD_(int)]; acl_type_t type; char type_[PAD_(acl_type_t)]; }; struct __acl_aclcheck_file_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; acl_type_t type; char type_[PAD_(acl_type_t)]; struct acl * aclp; char aclp_[PAD_(struct acl *)]; }; struct __acl_aclcheck_fd_args { + struct lwkt_msg lmsg; int filedes; char filedes_[PAD_(int)]; acl_type_t type; char type_[PAD_(acl_type_t)]; struct acl * aclp; char aclp_[PAD_(struct acl *)]; }; struct extattrctl_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; int cmd; char cmd_[PAD_(int)]; const char * attrname; char attrname_[PAD_(const char *)]; char * arg; char arg_[PAD_(char *)]; }; struct extattr_set_file_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; const char * attrname; char attrname_[PAD_(const char *)]; struct iovec * iovp; char iovp_[PAD_(struct iovec *)]; unsigned iovcnt; char iovcnt_[PAD_(unsigned)]; }; struct extattr_get_file_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; const char * attrname; char attrname_[PAD_(const char *)]; struct iovec * iovp; char iovp_[PAD_(struct iovec *)]; unsigned iovcnt; char iovcnt_[PAD_(unsigned)]; }; struct extattr_delete_file_args { + struct lwkt_msg lmsg; const char * path; char path_[PAD_(const char *)]; const char * attrname; char attrname_[PAD_(const char *)]; }; struct aio_waitcomplete_args { + struct lwkt_msg lmsg; struct aiocb ** aiocbp; char aiocbp_[PAD_(struct aiocb **)]; struct timespec * timeout; char timeout_[PAD_(struct timespec *)]; }; struct getresuid_args { + struct lwkt_msg lmsg; uid_t * ruid; char ruid_[PAD_(uid_t *)]; uid_t * euid; char euid_[PAD_(uid_t *)]; uid_t * suid; char suid_[PAD_(uid_t *)]; }; struct getresgid_args { + struct lwkt_msg lmsg; gid_t * rgid; char rgid_[PAD_(gid_t *)]; gid_t * egid; char egid_[PAD_(gid_t *)]; gid_t * sgid; char sgid_[PAD_(gid_t *)]; }; struct kqueue_args { + struct lwkt_msg lmsg; register_t dummy; }; struct kevent_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; const struct kevent * changelist; char changelist_[PAD_(const struct kevent *)]; int nchanges; char nchanges_[PAD_(int)]; @@ -1011,6 +1247,7 @@ struct kevent_args { const struct timespec * timeout; char timeout_[PAD_(const struct timespec *)]; }; struct sendfile_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int s; char s_[PAD_(int)]; off_t offset; char offset_[PAD_(off_t)]; @@ -1254,42 +1491,51 @@ int sendfile __P((struct sendfile_args *)); #ifdef COMPAT_43 struct ocreat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct olseek_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; long offset; char offset_[PAD_(long)]; int whence; char whence_[PAD_(int)]; }; struct ostat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct ostat * ub; char ub_[PAD_(struct ostat *)]; }; struct olstat_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; struct ostat * ub; char ub_[PAD_(struct ostat *)]; }; struct osigaction_args { + struct lwkt_msg lmsg; int signum; char signum_[PAD_(int)]; struct osigaction * nsa; char nsa_[PAD_(struct osigaction *)]; struct osigaction * osa; char osa_[PAD_(struct osigaction *)]; }; struct osigprocmask_args { + struct lwkt_msg lmsg; int how; char how_[PAD_(int)]; osigset_t mask; char mask_[PAD_(osigset_t)]; }; struct ofstat_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; struct ostat * sb; char sb_[PAD_(struct ostat *)]; }; struct getkerninfo_args { + struct lwkt_msg lmsg; int op; char op_[PAD_(int)]; char * where; char where_[PAD_(char *)]; size_t * size; char size_[PAD_(size_t *)]; int arg; char arg_[PAD_(int)]; }; struct ommap_args { + struct lwkt_msg lmsg; void * addr; char addr_[PAD_(void *)]; int len; char len_[PAD_(int)]; int prot; char prot_[PAD_(int)]; @@ -1298,91 +1544,112 @@ struct ommap_args { long pos; char pos_[PAD_(long)]; }; struct gethostname_args { + struct lwkt_msg lmsg; char * hostname; char hostname_[PAD_(char *)]; u_int len; char len_[PAD_(u_int)]; }; struct sethostname_args { + struct lwkt_msg lmsg; char * hostname; char hostname_[PAD_(char *)]; u_int len; char len_[PAD_(u_int)]; }; struct osend_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t buf; char buf_[PAD_(caddr_t)]; int len; char len_[PAD_(int)]; int flags; char flags_[PAD_(int)]; }; struct orecv_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t buf; char buf_[PAD_(caddr_t)]; int len; char len_[PAD_(int)]; int flags; char flags_[PAD_(int)]; }; struct osigreturn_args { + struct lwkt_msg lmsg; struct osigcontext * sigcntxp; char sigcntxp_[PAD_(struct osigcontext *)]; }; struct osigvec_args { + struct lwkt_msg lmsg; int signum; char signum_[PAD_(int)]; struct sigvec * nsv; char nsv_[PAD_(struct sigvec *)]; struct sigvec * osv; char osv_[PAD_(struct sigvec *)]; }; struct osigblock_args { + struct lwkt_msg lmsg; int mask; char mask_[PAD_(int)]; }; struct osigsetmask_args { + struct lwkt_msg lmsg; int mask; char mask_[PAD_(int)]; }; struct osigsuspend_args { + struct lwkt_msg lmsg; osigset_t mask; char mask_[PAD_(osigset_t)]; }; struct osigstack_args { + struct lwkt_msg lmsg; struct sigstack * nss; char nss_[PAD_(struct sigstack *)]; struct sigstack * oss; char oss_[PAD_(struct sigstack *)]; }; struct orecvmsg_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; struct omsghdr * msg; char msg_[PAD_(struct omsghdr *)]; int flags; char flags_[PAD_(int)]; }; struct osendmsg_args { + struct lwkt_msg lmsg; int s; char s_[PAD_(int)]; caddr_t msg; char msg_[PAD_(caddr_t)]; int flags; char flags_[PAD_(int)]; }; struct otruncate_args { + struct lwkt_msg lmsg; char * path; char path_[PAD_(char *)]; long length; char length_[PAD_(long)]; }; struct oftruncate_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; long length; char length_[PAD_(long)]; }; struct ogetpeername_args { + struct lwkt_msg lmsg; int fdes; char fdes_[PAD_(int)]; caddr_t asa; char asa_[PAD_(caddr_t)]; int * alen; char alen_[PAD_(int *)]; }; struct osethostid_args { + struct lwkt_msg lmsg; long hostid; char hostid_[PAD_(long)]; }; struct ogetrlimit_args { + struct lwkt_msg lmsg; u_int which; char which_[PAD_(u_int)]; struct orlimit * rlp; char rlp_[PAD_(struct orlimit *)]; }; struct osetrlimit_args { + struct lwkt_msg lmsg; u_int which; char which_[PAD_(u_int)]; struct orlimit * rlp; char rlp_[PAD_(struct orlimit *)]; }; struct okillpg_args { + struct lwkt_msg lmsg; int pgid; char pgid_[PAD_(int)]; int signum; char signum_[PAD_(int)]; }; struct ogetdirentries_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; u_int count; char count_[PAD_(u_int)]; long * basep; char basep_[PAD_(long *)]; }; struct osendfile_args { + struct lwkt_msg lmsg; int fd; char fd_[PAD_(int)]; int s; char s_[PAD_(int)]; off_t offset; char offset_[PAD_(off_t)]; diff --git a/sys/sys/sysunion.h b/sys/sys/sysunion.h new file mode 100644 index 0000000000..d0912d9100 --- /dev/null +++ b/sys/sys/sysunion.h @@ -0,0 +1,338 @@ +/* + * Union of syscall args for messaging. + * + * DO NOT EDIT-- this file is automatically generated. + * $DragonFly: src/sys/sys/sysunion.h,v 1.1 2003/07/24 01:41:27 dillon Exp $ + * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp + */ + +union sysunion { + struct lwkt_msg lmsg; + struct nosys_args nosys; + struct sys_exit_args sys_exit; + struct fork_args fork; + struct read_args read; + struct write_args write; + struct open_args open; + struct close_args close; + struct wait_args wait4; +#ifdef COMPAT_43 + struct ocreat_args ocreat; +#endif + struct link_args link; + struct unlink_args unlink; + struct chdir_args chdir; + struct fchdir_args fchdir; + struct mknod_args mknod; + struct chmod_args chmod; + struct chown_args chown; + struct obreak_args obreak; + struct getfsstat_args getfsstat; +#ifdef COMPAT_43 + struct olseek_args olseek; +#endif + struct getpid_args getpid; + struct mount_args mount; + struct unmount_args unmount; + struct setuid_args setuid; + struct getuid_args getuid; + struct geteuid_args geteuid; + struct ptrace_args ptrace; + struct recvmsg_args recvmsg; + struct sendmsg_args sendmsg; + struct recvfrom_args recvfrom; + struct accept_args accept; + struct getpeername_args getpeername; + struct getsockname_args getsockname; + struct access_args access; + struct chflags_args chflags; + struct fchflags_args fchflags; + struct sync_args sync; + struct kill_args kill; +#ifdef COMPAT_43 + struct ostat_args ostat; +#endif + struct getppid_args getppid; +#ifdef COMPAT_43 + struct olstat_args olstat; +#endif + struct dup_args dup; + struct pipe_args pipe; + struct getegid_args getegid; + struct profil_args profil; + struct ktrace_args ktrace; +#ifdef COMPAT_43 + struct osigaction_args osigaction; +#endif + struct getgid_args getgid; +#ifdef COMPAT_43 + struct osigprocmask_args osigprocmask; +#endif + struct getlogin_args getlogin; + struct setlogin_args setlogin; + struct acct_args acct; + struct osigpending_args osigpending; + struct sigaltstack_args sigaltstack; + struct ioctl_args ioctl; + struct reboot_args reboot; + struct revoke_args revoke; + struct symlink_args symlink; + struct readlink_args readlink; + struct execve_args execve; + struct umask_args umask; + struct chroot_args chroot; +#ifdef COMPAT_43 + struct ofstat_args ofstat; +#endif +#ifdef COMPAT_43 + struct getkerninfo_args getkerninfo; +#endif + struct getpagesize_args getpagesize; + struct msync_args msync; + struct vfork_args vfork; + struct sbrk_args sbrk; + struct sstk_args sstk; +#ifdef COMPAT_43 + struct ommap_args ommap; +#endif + struct ovadvise_args ovadvise; + struct munmap_args munmap; + struct mprotect_args mprotect; + struct madvise_args madvise; + struct mincore_args mincore; + struct getgroups_args getgroups; + struct setgroups_args setgroups; + struct getpgrp_args getpgrp; + struct setpgid_args setpgid; + struct setitimer_args setitimer; + struct owait_args owait; + struct swapon_args swapon; + struct getitimer_args getitimer; +#ifdef COMPAT_43 + struct gethostname_args gethostname; +#endif +#ifdef COMPAT_43 + struct sethostname_args sethostname; +#endif + struct getdtablesize_args getdtablesize; + struct dup2_args dup2; + struct fcntl_args fcntl; + struct select_args select; + struct fsync_args fsync; + struct setpriority_args setpriority; + struct socket_args socket; + struct connect_args connect; + struct getpriority_args getpriority; +#ifdef COMPAT_43 + struct osend_args osend; +#endif +#ifdef COMPAT_43 + struct orecv_args orecv; +#endif +#ifdef COMPAT_43 + struct osigreturn_args osigreturn; +#endif + struct bind_args bind; + struct setsockopt_args setsockopt; + struct listen_args listen; +#ifdef COMPAT_43 + struct osigvec_args osigvec; +#endif +#ifdef COMPAT_43 + struct osigblock_args osigblock; +#endif +#ifdef COMPAT_43 + struct osigsetmask_args osigsetmask; +#endif +#ifdef COMPAT_43 + struct osigsuspend_args osigsuspend; +#endif +#ifdef COMPAT_43 + struct osigstack_args osigstack; +#endif +#ifdef COMPAT_43 + struct orecvmsg_args orecvmsg; +#endif +#ifdef COMPAT_43 + struct osendmsg_args osendmsg; +#endif + struct gettimeofday_args gettimeofday; + struct getrusage_args getrusage; + struct getsockopt_args getsockopt; + struct readv_args readv; + struct writev_args writev; + struct settimeofday_args settimeofday; + struct fchown_args fchown; + struct fchmod_args fchmod; + struct setreuid_args setreuid; + struct setregid_args setregid; + struct rename_args rename; +#ifdef COMPAT_43 + struct otruncate_args otruncate; +#endif +#ifdef COMPAT_43 + struct oftruncate_args oftruncate; +#endif + struct flock_args flock; + struct mkfifo_args mkfifo; + struct sendto_args sendto; + struct shutdown_args shutdown; + struct socketpair_args socketpair; + struct mkdir_args mkdir; + struct rmdir_args rmdir; + struct utimes_args utimes; + struct adjtime_args adjtime; +#ifdef COMPAT_43 + struct ogetpeername_args ogetpeername; +#endif + struct ogethostid_args ogethostid; +#ifdef COMPAT_43 + struct osethostid_args osethostid; +#endif +#ifdef COMPAT_43 + struct ogetrlimit_args ogetrlimit; +#endif +#ifdef COMPAT_43 + struct osetrlimit_args osetrlimit; +#endif +#ifdef COMPAT_43 + struct okillpg_args okillpg; +#endif + struct setsid_args setsid; + struct quotactl_args quotactl; + struct oquota_args oquota; + struct nfssvc_args nfssvc; +#ifdef COMPAT_43 + struct ogetdirentries_args ogetdirentries; +#endif + struct statfs_args statfs; + struct fstatfs_args fstatfs; + struct getfh_args getfh; + struct getdomainname_args getdomainname; + struct setdomainname_args setdomainname; + struct uname_args uname; + struct sysarch_args sysarch; + struct rtprio_args rtprio; + struct semsys_args semsys; + struct msgsys_args msgsys; + struct shmsys_args shmsys; + struct pread_args pread; + struct pwrite_args pwrite; + struct ntp_adjtime_args ntp_adjtime; + struct setgid_args setgid; + struct setegid_args setegid; + struct seteuid_args seteuid; + struct stat_args stat; + struct fstat_args fstat; + struct lstat_args lstat; + struct pathconf_args pathconf; + struct fpathconf_args fpathconf; + struct __getrlimit_args getrlimit; + struct __setrlimit_args setrlimit; + struct getdirentries_args getdirentries; + struct mmap_args mmap; + struct lseek_args lseek; + struct truncate_args truncate; + struct ftruncate_args ftruncate; + struct sysctl_args __sysctl; + struct mlock_args mlock; + struct munlock_args munlock; + struct undelete_args undelete; + struct futimes_args futimes; + struct getpgid_args getpgid; + struct poll_args poll; + struct __semctl_args __semctl; + struct semget_args semget; + struct semop_args semop; + struct msgctl_args msgctl; + struct msgget_args msgget; + struct msgsnd_args msgsnd; + struct msgrcv_args msgrcv; + struct shmat_args shmat; + struct shmctl_args shmctl; + struct shmdt_args shmdt; + struct shmget_args shmget; + struct clock_gettime_args clock_gettime; + struct clock_settime_args clock_settime; + struct clock_getres_args clock_getres; + struct nanosleep_args nanosleep; + struct minherit_args minherit; + struct rfork_args rfork; + struct openbsd_poll_args openbsd_poll; + struct issetugid_args issetugid; + struct lchown_args lchown; + struct getdents_args getdents; + struct lchmod_args lchmod; + struct lutimes_args lutimes; + struct nstat_args nstat; + struct nfstat_args nfstat; + struct nlstat_args nlstat; + struct fhstatfs_args fhstatfs; + struct fhopen_args fhopen; + struct fhstat_args fhstat; + struct modnext_args modnext; + struct modstat_args modstat; + struct modfnext_args modfnext; + struct modfind_args modfind; + struct kldload_args kldload; + struct kldunload_args kldunload; + struct kldfind_args kldfind; + struct kldnext_args kldnext; + struct kldstat_args kldstat; + struct kldfirstmod_args kldfirstmod; + struct getsid_args getsid; + struct setresuid_args setresuid; + struct setresgid_args setresgid; + struct aio_return_args aio_return; + struct aio_suspend_args aio_suspend; + struct aio_cancel_args aio_cancel; + struct aio_error_args aio_error; + struct aio_read_args aio_read; + struct aio_write_args aio_write; + struct lio_listio_args lio_listio; + struct yield_args yield; + struct thr_sleep_args thr_sleep; + struct thr_wakeup_args thr_wakeup; + struct mlockall_args mlockall; + struct munlockall_args munlockall; + struct __getcwd_args __getcwd; + struct sched_setparam_args sched_setparam; + struct sched_getparam_args sched_getparam; + struct sched_setscheduler_args sched_setscheduler; + struct sched_getscheduler_args sched_getscheduler; + struct sched_yield_args sched_yield; + struct sched_get_priority_max_args sched_get_priority_max; + struct sched_get_priority_min_args sched_get_priority_min; + struct sched_rr_get_interval_args sched_rr_get_interval; + struct utrace_args utrace; +#ifdef COMPAT_43 + struct osendfile_args osendfile; +#endif + struct kldsym_args kldsym; + struct jail_args jail; + struct sigprocmask_args sigprocmask; + struct sigsuspend_args sigsuspend; + struct sigaction_args sigaction; + struct sigpending_args sigpending; + struct sigreturn_args sigreturn; + struct __acl_get_file_args __acl_get_file; + struct __acl_set_file_args __acl_set_file; + struct __acl_get_fd_args __acl_get_fd; + struct __acl_set_fd_args __acl_set_fd; + struct __acl_delete_file_args __acl_delete_file; + struct __acl_delete_fd_args __acl_delete_fd; + struct __acl_aclcheck_file_args __acl_aclcheck_file; + struct __acl_aclcheck_fd_args __acl_aclcheck_fd; + struct extattrctl_args extattrctl; + struct extattr_set_file_args extattr_set_file; + struct extattr_get_file_args extattr_get_file; + struct extattr_delete_file_args extattr_delete_file; + struct aio_waitcomplete_args aio_waitcomplete; + struct getresuid_args getresuid; + struct getresgid_args getresgid; + struct kqueue_args kqueue; + struct kevent_args kevent; + struct sendfile_args sendfile; +}; + +typedef union sysunion *sysmsg_t; diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h index cf482e699b..b08040765e 100644 --- a/sys/sys/vmmeter.h +++ b/sys/sys/vmmeter.h @@ -32,7 +32,7 @@ * * @(#)vmmeter.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/vmmeter.h,v 1.21.2.2 2002/10/10 19:28:21 dillon Exp $ - * $DragonFly: src/sys/sys/vmmeter.h,v 1.6 2003/07/12 16:55:52 dillon Exp $ + * $DragonFly: src/sys/sys/vmmeter.h,v 1.7 2003/07/24 01:41:27 dillon Exp $ */ #ifndef _SYS_VMMETER_H_ @@ -91,7 +91,8 @@ struct vmmeter { u_int v_forwarded_ints; /* forwarded interrupts due to MP lock */ u_int v_forwarded_hits; u_int v_forwarded_misses; -#define vmmeter_uint_end v_forwarded_misses + u_int v_sendsys; /* calls to sendsys() */ +#define vmmeter_uint_end v_sendsys }; struct vmstats { diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 8a313e4235..400a05ec35 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -39,7 +39,7 @@ * * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94 * $FreeBSD: src/sys/vm/vm_mmap.c,v 1.108.2.6 2002/07/02 20:06:19 dillon Exp $ - * $DragonFly: src/sys/vm/vm_mmap.c,v 1.6 2003/07/03 17:24:04 dillon Exp $ + * $DragonFly: src/sys/vm/vm_mmap.c,v 1.7 2003/07/24 01:41:27 dillon Exp $ */ /* @@ -80,12 +80,6 @@ #include -#ifndef _SYS_SYSPROTO_H_ -struct sbrk_args { - int incr; -}; -#endif - static int max_proc_mmap; SYSCTL_INT(_vm, OID_AUTO, max_proc_mmap, CTLFLAG_RW, &max_proc_mmap, 0, ""); -- 2.41.0