From 245e4f1762691b0acb74e169228f54b3f108f33e Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 12 Aug 2003 02:36:15 +0000 Subject: [PATCH] Syscall messaging 4: Further expand the kernel-version of the syscall message. The (in-kernel) syscall message is now arranged: struct blah_args { sysmsg usrmsg ... syscall arguments ... } Original system calls copyin() just the arguments and then initialize sysmsg and go. Syscall messages copyin() usrmsg+arguments and then initialize sysmsg as appropriate and go. Further detail work for EASYNC support. Implement td_msgport as a reply port and start working on an async capability for the nanosleep() system call. NOTE: Preliminary system call messaging can be tested using the suite of programs in /usr/src/test/sysmsg. NOTE: Work is still in progress and you can crash the system, so use of MSGF_ASYNC for messaging system calls is currently restricted to root. Also fixed a bug in the syscall module helper code in sys/sysent.h, which might have been causing the linux problems (or might not have). All system call headers had to be regenerated to deal with the structural changes. --- sys/emulation/ibcs2/i386/ibcs2_isc_syscall.h | 4 +- sys/emulation/ibcs2/i386/ibcs2_isc_sysent.c | 6 +- sys/emulation/ibcs2/i386/ibcs2_proto.h | 172 +++- sys/emulation/ibcs2/i386/ibcs2_syscall.h | 4 +- sys/emulation/ibcs2/i386/ibcs2_sysent.c | 6 +- sys/emulation/ibcs2/i386/ibcs2_union.h | 6 +- sys/emulation/ibcs2/i386/ibcs2_xenix.h | 55 +- .../ibcs2/i386/ibcs2_xenix_syscall.h | 4 +- sys/emulation/ibcs2/i386/ibcs2_xenix_sysent.c | 6 +- sys/emulation/linux/i386/linux_proto.h | 463 +++++++++- sys/emulation/linux/i386/linux_syscall.h | 4 +- sys/emulation/linux/i386/linux_sysent.c | 6 +- sys/emulation/linux/i386/linux_union.h | 6 +- sys/emulation/svr4/svr4_proto.h | 235 +++++- sys/emulation/svr4/svr4_syscall.h | 4 +- sys/emulation/svr4/svr4_syscallnames.c | 4 +- sys/emulation/svr4/svr4_sysent.c | 6 +- sys/emulation/svr4/svr4_union.h | 6 +- sys/i386/i386/trap.c | 173 ++-- sys/kern/init_sysent.c | 4 +- sys/kern/kern_device.c | 4 +- sys/kern/kern_time.c | 85 +- sys/kern/lwkt_msgport.c | 5 +- sys/kern/makesyscalls.sh | 18 +- sys/kern/syscalls.c | 2 +- sys/platform/pc32/i386/trap.c | 173 ++-- sys/sys/globaldata.h | 4 +- sys/sys/msgport.h | 15 +- sys/sys/msgport2.h | 15 +- sys/sys/syscall-hide.h | 2 +- sys/sys/syscall.h | 2 +- sys/sys/syscall.mk | 2 +- sys/sys/sysent.h | 6 +- sys/sys/sysmsg.h | 54 +- sys/sys/sysproto.h | 797 +++++++++++++++++- sys/sys/sysunion.h | 4 +- 36 files changed, 2170 insertions(+), 192 deletions(-) diff --git a/sys/emulation/ibcs2/i386/ibcs2_isc_syscall.h b/sys/emulation/ibcs2/i386/ibcs2_isc_syscall.h index 5e42a4f13c..facaae5fc5 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_isc_syscall.h +++ b/sys/emulation/ibcs2/i386/ibcs2_isc_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_isc_syscall.h,v 1.5 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.isc,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_isc_syscall.h,v 1.6 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.isc,v 1.3 2003/08/07 21:17:17 dillon Exp */ #define IBCS2_ISC_ibcs2_rename 2 diff --git a/sys/emulation/ibcs2/i386/ibcs2_isc_sysent.c b/sys/emulation/ibcs2/i386/ibcs2_isc_sysent.c index cbed380f29..af1e986e0c 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_isc_sysent.c +++ b/sys/emulation/ibcs2/i386/ibcs2_isc_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_isc_sysent.c,v 1.5 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.isc,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_isc_sysent.c,v 1.6 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.isc,v 1.3 2003/08/07 21:17:17 dillon Exp */ #include @@ -14,7 +14,7 @@ #include "ibcs2_proto.h" #include "ibcs2_xenix.h" -#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg)) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg) - sizeof(union usrmsg)) / sizeof(register_t)) /* The casts are bogus but will do for now. */ struct sysent isc_sysent[] = { diff --git a/sys/emulation/ibcs2/i386/ibcs2_proto.h b/sys/emulation/ibcs2/i386/ibcs2_proto.h index 5d0c07fdd2..31151b5f40 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.7 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/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.8 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.master,v 1.3 2003/08/07 21:17:17 dillon Exp */ #ifndef _IBCS2_SYSPROTO_H_ @@ -21,75 +21,117 @@ 0 : sizeof(register_t) - sizeof(t)) struct ibcs2_read_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; u_int nbytes; char nbytes_[PAD_(u_int)]; }; struct ibcs2_open_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct ibcs2_wait_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; }; struct ibcs2_creat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct ibcs2_unlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct ibcs2_execv_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; }; struct ibcs2_chdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct ibcs2_time_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; ibcs2_time_t * tp; char tp_[PAD_(ibcs2_time_t *)]; }; struct ibcs2_mknod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; int dev; char dev_[PAD_(int)]; }; struct ibcs2_chmod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct ibcs2_chown_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int uid; char uid_[PAD_(int)]; int gid; char gid_[PAD_(int)]; }; struct ibcs2_stat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_lseek_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; long offset; char offset_[PAD_(long)]; int whence; char whence_[PAD_(int)]; }; struct ibcs2_mount_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * special; char special_[PAD_(char *)]; char * dir; char dir_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; @@ -98,82 +140,130 @@ struct ibcs2_mount_args { int len; char len_[PAD_(int)]; }; struct ibcs2_umount_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * name; char name_[PAD_(char *)]; }; struct ibcs2_setuid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int uid; char uid_[PAD_(int)]; }; struct ibcs2_stime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; long * timep; char timep_[PAD_(long *)]; }; struct ibcs2_alarm_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; unsigned sec; char sec_[PAD_(unsigned)]; }; struct ibcs2_fstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_pause_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct ibcs2_utime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct ibcs2_utimbuf * buf; char buf_[PAD_(struct ibcs2_utimbuf *)]; }; struct ibcs2_stty_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct sgttyb * buf; char buf_[PAD_(struct sgttyb *)]; }; struct ibcs2_gtty_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct sgttyb * buf; char buf_[PAD_(struct sgttyb *)]; }; struct ibcs2_access_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct ibcs2_nice_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int incr; char incr_[PAD_(int)]; }; struct ibcs2_statfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int pid; char pid_[PAD_(int)]; int signo; char signo_[PAD_(int)]; }; struct ibcs2_fstatfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -181,24 +271,39 @@ struct ibcs2_xenix_args { int a5; char a5_[PAD_(int)]; }; struct ibcs2_times_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct tms * tp; char tp_[PAD_(struct tms *)]; }; struct ibcs2_plock_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; }; struct ibcs2_setgid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int gid; char gid_[PAD_(int)]; }; struct ibcs2_sigsys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int sig; char sig_[PAD_(int)]; ibcs2_sig_t fp; char fp_[PAD_(ibcs2_sig_t)]; }; struct ibcs2_msgsys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -207,19 +312,28 @@ struct ibcs2_msgsys_args { int a6; char a6_[PAD_(int)]; }; struct ibcs2_sysi86_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; int * arg; char arg_[PAD_(int *)]; }; struct ibcs2_shmsys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -227,83 +341,125 @@ struct ibcs2_semsys_args { int a5; char a5_[PAD_(int)]; }; struct ibcs2_ioctl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; caddr_t data; char data_[PAD_(caddr_t)]; }; struct ibcs2_uadmin_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; int func; char func_[PAD_(int)]; caddr_t data; char data_[PAD_(caddr_t)]; }; struct ibcs2_utssys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int flag; char flag_[PAD_(int)]; }; struct ibcs2_execve_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; char ** envp; char envp_[PAD_(char **)]; }; struct ibcs2_fcntl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; char * arg; char arg_[PAD_(char *)]; }; struct ibcs2_ulimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; int newlimit; char newlimit_[PAD_(int)]; }; struct ibcs2_rmdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct ibcs2_mkdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct ibcs2_getdents_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; int nbytes; char nbytes_[PAD_(int)]; }; struct ibcs2_sysfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; caddr_t d1; char d1_[PAD_(caddr_t)]; char * buf; char buf_[PAD_(char *)]; }; struct ibcs2_getmsg_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; @@ -312,23 +468,35 @@ struct ibcs2_secure_args { int a5; char a5_[PAD_(int)]; }; struct ibcs2_symlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char * link; char link_[PAD_(char *)]; }; struct ibcs2_lstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct ibcs2_stat * st; char st_[PAD_(struct ibcs2_stat *)]; }; struct ibcs2_readlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char * buf; char buf_[PAD_(char *)]; int count; char count_[PAD_(int)]; }; struct ibcs2_isc_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; diff --git a/sys/emulation/ibcs2/i386/ibcs2_syscall.h b/sys/emulation/ibcs2/i386/ibcs2_syscall.h index 0bb3eec415..ec59904c99 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.7 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/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.8 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.master,v 1.3 2003/08/07 21:17:17 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 745dcbc427..083925535c 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.7 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/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.8 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.master,v 1.3 2003/08/07 21:17:17 dillon Exp */ #include @@ -13,7 +13,7 @@ #include "ibcs2_signal.h" #include "ibcs2_proto.h" -#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg)) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg) - sizeof(union usrmsg)) / sizeof(register_t)) /* The casts are bogus but will do for now. */ struct sysent ibcs2_sysent[] = { diff --git a/sys/emulation/ibcs2/i386/ibcs2_union.h b/sys/emulation/ibcs2/i386/ibcs2_union.h index 2cdad9f8c7..b5d058d2e7 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_union.h +++ b/sys/emulation/ibcs2/i386/ibcs2_union.h @@ -2,13 +2,15 @@ * Union of syscall args for messaging. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_union.h,v 1.3 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.master,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_union.h,v 1.4 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.master,v 1.3 2003/08/07 21:17:17 dillon Exp */ union sysunion { +#ifdef _KERNEL /* header only applies in kernel */ struct lwkt_msg lmsg; union sysmsg sysmsg; +#endif struct ibcs2_read_args ibcs2_read; struct ibcs2_open_args ibcs2_open; struct ibcs2_wait_args ibcs2_wait; diff --git a/sys/emulation/ibcs2/i386/ibcs2_xenix.h b/sys/emulation/ibcs2/i386/ibcs2_xenix.h index 97a378c3e4..9ccbb0f649 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_xenix.h +++ b/sys/emulation/ibcs2/i386/ibcs2_xenix.h @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_xenix.h,v 1.6 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.xenix,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_xenix.h,v 1.7 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.xenix,v 1.3 2003/08/07 21:17:17 dillon Exp */ #ifndef _IBCS2_XENIX_H_ @@ -21,82 +21,133 @@ 0 : sizeof(register_t) - sizeof(t)) struct xenix_rdchk_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; }; struct xenix_chsize_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; long size; char size_[PAD_(long)]; }; struct xenix_ftime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct timeb * tp; char tp_[PAD_(struct timeb *)]; }; struct xenix_nap_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int millisec; char millisec_[PAD_(int)]; }; struct xenix_scoinfo_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct xenix_eaccess_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct ibcs2_sigaction_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int sig; char sig_[PAD_(int)]; struct ibcs2_sigaction * act; char act_[PAD_(struct ibcs2_sigaction *)]; struct ibcs2_sigaction * oact; char oact_[PAD_(struct ibcs2_sigaction *)]; }; struct ibcs2_sigprocmask_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int how; char how_[PAD_(int)]; ibcs2_sigset_t * set; char set_[PAD_(ibcs2_sigset_t *)]; ibcs2_sigset_t * oset; char oset_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_sigpending_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; ibcs2_sigset_t * mask; char mask_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_sigsuspend_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; ibcs2_sigset_t * mask; char mask_[PAD_(ibcs2_sigset_t *)]; }; struct ibcs2_getgroups_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int gidsetsize; char gidsetsize_[PAD_(int)]; ibcs2_gid_t * gidset; char gidset_[PAD_(ibcs2_gid_t *)]; }; struct ibcs2_setgroups_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int gidsetsize; char gidsetsize_[PAD_(int)]; ibcs2_gid_t * gidset; char gidset_[PAD_(ibcs2_gid_t *)]; }; struct ibcs2_sysconf_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int name; char name_[PAD_(int)]; }; struct ibcs2_pathconf_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int name; char name_[PAD_(int)]; }; struct ibcs2_fpathconf_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int name; char name_[PAD_(int)]; }; struct ibcs2_rename_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * from; char from_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct xenix_utsname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; long addr; char addr_[PAD_(long)]; }; diff --git a/sys/emulation/ibcs2/i386/ibcs2_xenix_syscall.h b/sys/emulation/ibcs2/i386/ibcs2_xenix_syscall.h index a9376e84c1..3a8a0c2af5 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_xenix_syscall.h +++ b/sys/emulation/ibcs2/i386/ibcs2_xenix_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_xenix_syscall.h,v 1.5 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.xenix,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_xenix_syscall.h,v 1.6 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.xenix,v 1.3 2003/08/07 21:17:17 dillon Exp */ #define IBCS2_XENIX_xenix_rdchk 7 diff --git a/sys/emulation/ibcs2/i386/ibcs2_xenix_sysent.c b/sys/emulation/ibcs2/i386/ibcs2_xenix_sysent.c index 3bd741e4ea..8517c3c37a 100644 --- a/sys/emulation/ibcs2/i386/ibcs2_xenix_sysent.c +++ b/sys/emulation/ibcs2/i386/ibcs2_xenix_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_xenix_sysent.c,v 1.5 2003/08/07 21:17:17 dillon Exp $ - * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.xenix,v 1.2 2003/06/17 04:28:35 dillon Exp + * $DragonFly: src/sys/emulation/ibcs2/i386/Attic/ibcs2_xenix_sysent.c,v 1.6 2003/08/12 02:36:13 dillon Exp $ + * created from DragonFly: src/sys/emulation/ibcs2/i386/syscalls.xenix,v 1.3 2003/08/07 21:17:17 dillon Exp */ #include @@ -13,7 +13,7 @@ #include "ibcs2_signal.h" #include "ibcs2_xenix.h" -#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg)) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg) - sizeof(union usrmsg)) / sizeof(register_t)) /* The casts are bogus but will do for now. */ struct sysent xenix_sysent[] = { diff --git a/sys/emulation/linux/i386/linux_proto.h b/sys/emulation/linux/i386/linux_proto.h index 4c8f044219..7f14983a71 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.7 2003/08/07 21:17:18 dillon Exp $ - * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp + * $DragonFly: src/sys/emulation/linux/i386/linux_proto.h,v 1.8 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.3 2003/08/07 21:17:18 dillon Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -21,83 +21,131 @@ 0 : sizeof(register_t) - sizeof(t)) struct linux_fork_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_open_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; l_int mode; char mode_[PAD_(l_int)]; }; struct linux_link_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct linux_unlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct linux_execve_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; char ** envp; char envp_[PAD_(char **)]; }; struct linux_chdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct linux_time_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_time_t * tm; char tm_[PAD_(l_time_t *)]; }; struct linux_mknod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; l_mode_t mode; char mode_[PAD_(l_mode_t)]; }; struct linux_lchown16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct ostat * up; char up_[PAD_(struct ostat *)]; }; struct linux_lseek_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_mount_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * specialfile; char specialfile_[PAD_(char *)]; char * dir; char dir_[PAD_(char *)]; char * filesystemtype; char filesystemtype_[PAD_(char *)]; @@ -105,314 +153,509 @@ struct linux_mount_args { void * data; char data_[PAD_(void *)]; }; struct linux_oldumount_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct linux_setuid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uid16_t uid; char uid_[PAD_(l_uid16_t)]; }; struct linux_getuid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_stime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_ptrace_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint secs; char secs_[PAD_(l_uint)]; }; struct linux_fstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint fd; char fd_[PAD_(l_uint)]; struct ostat * up; char up_[PAD_(struct ostat *)]; }; struct linux_pause_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_utime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * fname; char fname_[PAD_(char *)]; struct l_utimbuf * times; char times_[PAD_(struct l_utimbuf *)]; }; struct linux_access_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; l_int flags; char flags_[PAD_(l_int)]; }; struct linux_nice_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int inc; char inc_[PAD_(l_int)]; }; struct linux_kill_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int pid; char pid_[PAD_(l_int)]; l_int signum; char signum_[PAD_(l_int)]; }; struct linux_rename_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * from; char from_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct linux_mkdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; l_int mode; char mode_[PAD_(l_int)]; }; struct linux_rmdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct linux_pipe_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_ulong * pipefds; char pipefds_[PAD_(l_ulong *)]; }; struct linux_times_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct l_times_argv * buf; char buf_[PAD_(struct l_times_argv *)]; }; struct linux_brk_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_ulong dsend; char dsend_[PAD_(l_ulong)]; }; struct linux_setgid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_gid16_t gid; char gid_[PAD_(l_gid16_t)]; }; struct linux_getgid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_signal_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int sig; char sig_[PAD_(l_int)]; l_handler_t handler; char handler_[PAD_(l_handler_t)]; }; struct linux_geteuid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_getegid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_umount_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; l_int flags; char flags_[PAD_(l_int)]; }; struct linux_ioctl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_ustat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_dev_t dev; char dev_[PAD_(l_dev_t)]; struct l_ustat * ubuf; char ubuf_[PAD_(struct l_ustat *)]; }; struct linux_sigaction_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_ssetmask_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_osigset_t mask; char mask_[PAD_(l_osigset_t)]; }; struct linux_setreuid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uid16_t ruid; char ruid_[PAD_(l_uid16_t)]; l_uid16_t euid; char euid_[PAD_(l_uid16_t)]; }; struct linux_setregid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_gid16_t rgid; char rgid_[PAD_(l_gid16_t)]; l_gid16_t egid; char egid_[PAD_(l_gid16_t)]; }; struct linux_sigsuspend_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_osigset_t * mask; char mask_[PAD_(l_osigset_t *)]; }; struct linux_setrlimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint resource; char resource_[PAD_(l_uint)]; struct l_rlimit * rlim; char rlim_[PAD_(struct l_rlimit *)]; }; struct linux_old_getrlimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint resource; char resource_[PAD_(l_uint)]; struct l_rlimit * rlim; char rlim_[PAD_(struct l_rlimit *)]; }; struct linux_getgroups16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint gidsetsize; char gidsetsize_[PAD_(l_uint)]; l_gid16_t * gidset; char gidset_[PAD_(l_gid16_t *)]; }; struct linux_setgroups16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint gidsetsize; char gidsetsize_[PAD_(l_uint)]; l_gid16_t * gidset; char gidset_[PAD_(l_gid16_t *)]; }; struct linux_old_select_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct l_old_select_argv * ptr; char ptr_[PAD_(struct l_old_select_argv *)]; }; struct linux_symlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct linux_readlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * name; char name_[PAD_(char *)]; char * buf; char buf_[PAD_(char *)]; l_int count; char count_[PAD_(l_int)]; }; struct linux_uselib_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * library; char library_[PAD_(char *)]; }; struct linux_reboot_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct l_mmap_argv * ptr; char ptr_[PAD_(struct l_mmap_argv *)]; }; struct linux_truncate_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; l_ulong length; char length_[PAD_(l_ulong)]; }; struct linux_statfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct l_statfs_buf * buf; char buf_[PAD_(struct l_statfs_buf *)]; }; struct linux_fstatfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint fd; char fd_[PAD_(l_uint)]; struct l_statfs_buf * buf; char buf_[PAD_(struct l_statfs_buf *)]; }; struct linux_ioperm_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int what; char what_[PAD_(l_int)]; l_ulong args; char args_[PAD_(l_ulong)]; }; struct linux_syslog_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int which; char which_[PAD_(l_int)]; struct l_itimerval * itv; char itv_[PAD_(struct l_itimerval *)]; }; struct linux_newstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct l_newstat * buf; char buf_[PAD_(struct l_newstat *)]; }; struct linux_newlstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct l_newstat * buf; char buf_[PAD_(struct l_newstat *)]; }; struct linux_newfstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint fd; char fd_[PAD_(l_uint)]; struct l_newstat * buf; char buf_[PAD_(struct l_newstat *)]; }; struct linux_uname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_iopl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_ulong level; char level_[PAD_(l_ulong)]; }; struct linux_vhangup_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_vm86old_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_wait4_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_sysinfo_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct l_sysinfo * info; char info_[PAD_(struct l_sysinfo *)]; }; struct linux_ipc_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint what; char what_[PAD_(l_uint)]; l_int arg1; char arg1_[PAD_(l_int)]; l_int arg2; char arg2_[PAD_(l_int)]; @@ -421,78 +664,129 @@ struct linux_ipc_args { l_long arg5; char arg5_[PAD_(l_long)]; }; struct linux_sigreturn_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct l_sigframe * sfp; char sfp_[PAD_(struct l_sigframe *)]; }; struct linux_clone_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int flags; char flags_[PAD_(l_int)]; void * stack; char stack_[PAD_(void *)]; }; struct linux_newuname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct l_new_utsname * buf; char buf_[PAD_(struct l_new_utsname *)]; }; struct linux_modify_ldt_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_sigprocmask_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_init_module_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_delete_module_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_get_kernel_syms_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_quotactl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_bdflush_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_sysfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_ulong per; char per_[PAD_(l_ulong)]; }; struct linux_setfsuid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uid16_t uid; char uid_[PAD_(l_uid16_t)]; }; struct linux_setfsgid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_gid16_t gid; char gid_[PAD_(l_gid16_t)]; }; struct linux_llseek_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int fd; char fd_[PAD_(l_int)]; l_ulong ohigh; char ohigh_[PAD_(l_ulong)]; l_ulong olow; char olow_[PAD_(l_ulong)]; @@ -500,13 +794,19 @@ struct linux_llseek_args { l_uint whence; char whence_[PAD_(l_uint)]; }; struct linux_getdents_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 *)]; @@ -514,43 +814,70 @@ struct linux_select_args { struct l_timeval * timeout; char timeout_[PAD_(struct l_timeval *)]; }; struct linux_msync_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_pid_t pid; char pid_[PAD_(l_pid_t)]; }; struct linux_fdatasync_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint fd; char fd_[PAD_(l_uint)]; }; struct linux_sysctl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct l___sysctl_args * args; char args_[PAD_(struct l___sysctl_args *)]; }; struct linux_sched_setscheduler_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_pid_t pid; char pid_[PAD_(l_pid_t)]; }; struct linux_sched_get_priority_max_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int policy; char policy_[PAD_(l_int)]; }; struct linux_sched_get_priority_min_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int policy; char policy_[PAD_(l_int)]; }; struct linux_mremap_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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)]; @@ -558,133 +885,211 @@ struct linux_mremap_args { l_ulong new_addr; char new_addr_[PAD_(l_ulong)]; }; struct linux_setresuid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_query_module_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_nfsservctl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_setresgid16_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_rt_sigreturn_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct l_ucontext * ucp; char ucp_[PAD_(struct l_ucontext *)]; }; struct linux_rt_sigaction_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_rt_sigtimedwait_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_rt_sigqueueinfo_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_rt_sigsuspend_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_sigset_t * newset; char newset_[PAD_(l_sigset_t *)]; l_size_t sigsetsize; char sigsetsize_[PAD_(l_size_t)]; }; struct linux_pread_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * buf; char buf_[PAD_(char *)]; l_ulong bufsize; char bufsize_[PAD_(l_ulong)]; }; struct linux_capget_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_capset_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_sigaltstack_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_stack_t * uss; char uss_[PAD_(l_stack_t *)]; l_stack_t * uoss; char uoss_[PAD_(l_stack_t *)]; }; struct linux_sendfile_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_vfork_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_getrlimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint resource; char resource_[PAD_(l_uint)]; struct l_rlimit * rlim; char rlim_[PAD_(struct l_rlimit *)]; }; struct linux_mmap2_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_ulong addr; char addr_[PAD_(l_ulong)]; l_ulong len; char len_[PAD_(l_ulong)]; l_ulong prot; char prot_[PAD_(l_ulong)]; @@ -693,94 +1098,148 @@ struct linux_mmap2_args { l_ulong pgoff; char pgoff_[PAD_(l_ulong)]; }; struct linux_truncate64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; l_loff_t length; char length_[PAD_(l_loff_t)]; }; struct linux_ftruncate64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uint fd; char fd_[PAD_(l_uint)]; l_loff_t length; char length_[PAD_(l_loff_t)]; }; struct linux_stat64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_getgid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_getgroups_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int gidsetsize; char gidsetsize_[PAD_(l_int)]; l_gid_t * grouplist; char grouplist_[PAD_(l_gid_t *)]; }; struct linux_setgroups_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_int gidsetsize; char gidsetsize_[PAD_(l_int)]; l_gid_t * grouplist; char grouplist_[PAD_(l_gid_t *)]; }; struct linux_chown_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_uid_t uid; char uid_[PAD_(l_uid_t)]; }; struct linux_setfsgid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; l_gid_t gid; char gid_[PAD_(l_gid_t)]; }; struct linux_pivot_root_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * new_root; char new_root_[PAD_(char *)]; char * put_old; char put_old_[PAD_(char *)]; }; struct linux_mincore_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct linux_getdents64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 9715ebad54..762d8dad02 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.7 2003/08/07 21:17:18 dillon Exp $ - * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp + * $DragonFly: src/sys/emulation/linux/i386/linux_syscall.h,v 1.8 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.3 2003/08/07 21:17:18 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 a1821e43e4..bbd9721d4e 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.7 2003/08/07 21:17:18 dillon Exp $ - * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp + * $DragonFly: src/sys/emulation/linux/i386/linux_sysent.c,v 1.8 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.3 2003/08/07 21:17:18 dillon Exp */ #include "opt_compat.h" @@ -13,7 +13,7 @@ #include "linux.h" #include "linux_proto.h" -#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg)) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg) - sizeof(union usrmsg)) / sizeof(register_t)) /* The casts are bogus but will do for now. */ struct sysent linux_sysent[] = { diff --git a/sys/emulation/linux/i386/linux_union.h b/sys/emulation/linux/i386/linux_union.h index 7f5df143f6..6b6d639de4 100644 --- a/sys/emulation/linux/i386/linux_union.h +++ b/sys/emulation/linux/i386/linux_union.h @@ -2,13 +2,15 @@ * Union of syscall args for messaging. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/linux/i386/linux_union.h,v 1.3 2003/08/07 21:17:18 dillon Exp $ - * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.2 2003/06/17 04:28:39 dillon Exp + * $DragonFly: src/sys/emulation/linux/i386/linux_union.h,v 1.4 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/linux/i386/syscalls.master,v 1.3 2003/08/07 21:17:18 dillon Exp */ union sysunion { +#ifdef _KERNEL /* header only applies in kernel */ struct lwkt_msg lmsg; union sysmsg sysmsg; +#endif struct linux_fork_args linux_fork; struct linux_open_args linux_open; struct linux_waitpid_args linux_waitpid; diff --git a/sys/emulation/svr4/svr4_proto.h b/sys/emulation/svr4/svr4_proto.h index 42a918c2e7..af83867744 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.7 2003/08/07 21:17:19 dillon Exp $ - * created from DragonFly: src/sys/emulation/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.8 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/svr4/syscalls.master,v 1.3 2003/08/07 21:17:19 dillon Exp */ #ifndef _SVR4_SYSPROTO_H_ @@ -21,94 +21,151 @@ 0 : sizeof(register_t) - sizeof(t)) struct svr4_sys_open_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct svr4_sys_wait_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int * status; char status_[PAD_(int *)]; }; struct svr4_sys_creat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct svr4_sys_execv_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; }; struct svr4_sys_time_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; time_t * t; char t_[PAD_(time_t *)]; }; struct svr4_sys_mknod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; int dev; char dev_[PAD_(int)]; }; struct svr4_sys_break_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; caddr_t nsize; char nsize_[PAD_(caddr_t)]; }; struct svr4_sys_stat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct svr4_stat * ub; char ub_[PAD_(struct svr4_stat *)]; }; struct svr4_sys_alarm_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; unsigned sec; char sec_[PAD_(unsigned)]; }; struct svr4_sys_fstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct svr4_stat * sb; char sb_[PAD_(struct svr4_stat *)]; }; struct svr4_sys_pause_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct svr4_sys_utime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct svr4_utimbuf * ubuf; char ubuf_[PAD_(struct svr4_utimbuf *)]; }; struct svr4_sys_access_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct svr4_sys_nice_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int prio; char prio_[PAD_(int)]; }; struct svr4_sys_kill_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int pid; char pid_[PAD_(int)]; int signum; char signum_[PAD_(int)]; }; struct svr4_sys_pgrpsys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; int pid; char pid_[PAD_(int)]; int pgid; char pgid_[PAD_(int)]; }; struct svr4_sys_times_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct tms * tp; char tp_[PAD_(struct tms *)]; }; struct svr4_sys_signal_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int signum; char signum_[PAD_(int)]; svr4_sig_t handler; char handler_[PAD_(svr4_sig_t)]; }; #if defined(NOTYET) struct svr4_sys_msgsys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int what; char what_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -118,121 +175,184 @@ struct svr4_sys_msgsys_args { #else #endif struct svr4_sys_sysarch_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int op; char op_[PAD_(int)]; void * a1; char a1_[PAD_(void *)]; }; struct svr4_sys_ioctl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char ** argp; char argp_[PAD_(char **)]; char ** envp; char envp_[PAD_(char **)]; }; struct svr4_sys_fcntl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; char * arg; char arg_[PAD_(char *)]; }; struct svr4_sys_ulimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; long newlimit; char newlimit_[PAD_(long)]; }; struct svr4_sys_getdents_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; int nbytes; char nbytes_[PAD_(int)]; }; struct svr4_sys_getmsg_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct svr4_stat * ub; char ub_[PAD_(struct svr4_stat *)]; }; struct svr4_sys_sigprocmask_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; svr4_sigset_t * ss; char ss_[PAD_(svr4_sigset_t *)]; }; struct svr4_sys_sigaltstack_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int what; char what_[PAD_(int)]; svr4_sigset_t * mask; char mask_[PAD_(svr4_sigset_t *)]; }; struct svr4_sys_context_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int func; char func_[PAD_(int)]; struct svr4_ucontext * uc; char uc_[PAD_(struct svr4_ucontext *)]; }; struct svr4_sys_statvfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct svr4_statvfs * fs; char fs_[PAD_(struct svr4_statvfs *)]; }; struct svr4_sys_fstatvfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct svr4_statvfs * fs; char fs_[PAD_(struct svr4_statvfs *)]; }; struct svr4_sys_waitsys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int cmd; char cmd_[PAD_(int)]; int fun; char fun_[PAD_(int)]; int sub; char sub_[PAD_(int)]; @@ -240,12 +360,18 @@ struct svr4_sys_hrtsys_args { void * rv2; char rv2_[PAD_(void *)]; }; struct svr4_sys_pathconf_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int name; char name_[PAD_(int)]; }; struct svr4_sys_mmap_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; caddr_t addr; char addr_[PAD_(caddr_t)]; svr4_size_t len; char len_[PAD_(svr4_size_t)]; int prot; char prot_[PAD_(int)]; @@ -254,47 +380,71 @@ struct svr4_sys_mmap_args { svr4_off_t pos; char pos_[PAD_(svr4_off_t)]; }; struct svr4_sys_fpathconf_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int name; char name_[PAD_(int)]; }; struct svr4_sys_xstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; const struct svr4_rlimit * rlp; char rlp_[PAD_(const struct svr4_rlimit *)]; }; struct svr4_sys_getrlimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; struct svr4_rlimit * rlp; char rlp_[PAD_(struct svr4_rlimit *)]; }; struct svr4_sys_memcntl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; void * addr; char addr_[PAD_(void *)]; svr4_size_t len; char len_[PAD_(svr4_size_t)]; int cmd; char cmd_[PAD_(int)]; @@ -303,53 +453,83 @@ struct svr4_sys_memcntl_args { int mask; char mask_[PAD_(int)]; }; struct svr4_sys_uname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct svr4_utsname * name; char name_[PAD_(struct svr4_utsname *)]; int dummy; char dummy_[PAD_(int)]; }; struct svr4_sys_sysconfig_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int name; char name_[PAD_(int)]; }; struct svr4_sys_systeminfo_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int what; char what_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; long len; char len_[PAD_(long)]; }; struct svr4_sys_fchroot_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; }; struct svr4_sys_utimes_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct svr4_sys_vhangup_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct svr4_sys_gettimeofday_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct timeval * tp; char tp_[PAD_(struct timeval *)]; }; struct svr4_sys_llseek_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int code; char code_[PAD_(int)]; int a1; char a1_[PAD_(int)]; int a2; char a2_[PAD_(int)]; @@ -358,26 +538,38 @@ struct svr4_sys_auditsys_args { int a5; char a5_[PAD_(int)]; }; struct svr4_sys_facl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; void * addr; char addr_[PAD_(void *)]; svr4_size_t len; char len_[PAD_(svr4_size_t)]; int prot; char prot_[PAD_(int)]; @@ -386,73 +578,112 @@ struct svr4_sys_mmap64_args { svr4_off64_t pos; char pos_[PAD_(svr4_off64_t)]; }; struct svr4_sys_stat64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct svr4_stat64 * sb; char sb_[PAD_(struct svr4_stat64 *)]; }; struct svr4_sys_lstat64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct svr4_stat64 * sb; char sb_[PAD_(struct svr4_stat64 *)]; }; struct svr4_sys_fstat64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct svr4_stat64 * sb; char sb_[PAD_(struct svr4_stat64 *)]; }; struct svr4_sys_statvfs64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct svr4_statvfs64 * fs; char fs_[PAD_(struct svr4_statvfs64 *)]; }; struct svr4_sys_fstatvfs64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct svr4_statvfs64 * fs; char fs_[PAD_(struct svr4_statvfs64 *)]; }; struct svr4_sys_setrlimit64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; const struct svr4_rlimit64 * rlp; char rlp_[PAD_(const struct svr4_rlimit64 *)]; }; struct svr4_sys_getrlimit64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; struct svr4_rlimit64 * rlp; char rlp_[PAD_(struct svr4_rlimit64 *)]; }; struct svr4_sys_creat64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct svr4_sys_open64_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct svr4_sys_socket_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int domain; char domain_[PAD_(int)]; int type; char type_[PAD_(int)]; int protocol; char protocol_[PAD_(int)]; }; struct svr4_sys_recv_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 fa2cc6d52a..cfe3b874ab 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.7 2003/08/07 21:17:19 dillon Exp $ - * created from DragonFly: src/sys/emulation/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.8 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/svr4/syscalls.master,v 1.3 2003/08/07 21:17:19 dillon Exp */ #define SVR4_SYS_exit 1 diff --git a/sys/emulation/svr4/svr4_syscallnames.c b/sys/emulation/svr4/svr4_syscallnames.c index 08031fbeeb..ebfe16952b 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.7 2003/08/07 21:17:19 dillon Exp $ - * created from DragonFly: src/sys/emulation/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.8 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/svr4/syscalls.master,v 1.3 2003/08/07 21:17:19 dillon Exp */ char *svr4_syscallnames[] = { diff --git a/sys/emulation/svr4/svr4_sysent.c b/sys/emulation/svr4/svr4_sysent.c index a82127aa3c..45d9db6a2e 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.7 2003/08/07 21:17:19 dillon Exp $ - * created from DragonFly: src/sys/emulation/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.8 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/svr4/syscalls.master,v 1.3 2003/08/07 21:17:19 dillon Exp */ #include @@ -15,7 +15,7 @@ #include "svr4_signal.h" #include "svr4_proto.h" -#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg)) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg) - sizeof(union usrmsg)) / sizeof(register_t)) /* The casts are bogus but will do for now. */ struct sysent svr4_sysent[] = { diff --git a/sys/emulation/svr4/svr4_union.h b/sys/emulation/svr4/svr4_union.h index 15f2c2ae51..33950dd34d 100644 --- a/sys/emulation/svr4/svr4_union.h +++ b/sys/emulation/svr4/svr4_union.h @@ -2,13 +2,15 @@ * Union of syscall args for messaging. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/emulation/svr4/Attic/svr4_union.h,v 1.3 2003/08/07 21:17:19 dillon Exp $ - * created from DragonFly: src/sys/emulation/svr4/syscalls.master,v 1.2 2003/06/17 04:28:58 dillon Exp + * $DragonFly: src/sys/emulation/svr4/Attic/svr4_union.h,v 1.4 2003/08/12 02:36:15 dillon Exp $ + * created from DragonFly: src/sys/emulation/svr4/syscalls.master,v 1.3 2003/08/07 21:17:19 dillon Exp */ union sysunion { +#ifdef _KERNEL /* header only applies in kernel */ struct lwkt_msg lmsg; union sysmsg sysmsg; +#endif struct svr4_sys_open_args svr4_sys_open; struct svr4_sys_wait_args svr4_sys_wait; struct svr4_sys_creat_args svr4_sys_creat; diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 24d7c33edc..ee961e41c5 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.31 2003/08/07 21:17:22 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/trap.c,v 1.32 2003/08/12 02:36:15 dillon Exp $ */ /* @@ -100,6 +100,7 @@ #include #include +#include #include int (*pmath_emulate) __P((struct trapframe *)); @@ -1219,7 +1220,7 @@ syscall2(struct trapframe frame) /* * The prep code is not MP aware. */ - (*p->p_sysent->sv_prepsyscall)(&frame, (int *)(&args.sysmsg + 1), &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(&frame, (int *)(&args.nosys.usrmsg + 1), &code, ¶ms); } else { /* * Need to check if this is a 32 bit or 64 bit syscall. @@ -1254,11 +1255,11 @@ syscall2(struct trapframe frame) /* * copyin is MP aware, but the tracing code is not */ - if (params && (i = narg * sizeof(int)) && - (error = copyin(params, (caddr_t)(&args.sysmsg + 1), (u_int)i))) { + if (params && (i = narg * sizeof(register_t)) && + (error = copyin(params, (caddr_t)(&args.nosys.usrmsg + 1), (u_int)i))) { #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(p->p_tracep, code, narg, (void *)(&args.sysmsg + 1)); + ktrsyscall(p->p_tracep, code, narg, (void *)(&args.nosys.usrmsg + 1)); #endif goto bad; } @@ -1277,9 +1278,10 @@ syscall2(struct trapframe frame) #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) { - ktrsyscall(p->p_tracep, code, narg, (void *)(&args.sysmsg + 1)); + ktrsyscall(p->p_tracep, code, narg, (void *)(&args.nosys.usrmsg + 1)); } #endif + lwkt_initmsg(&args.lmsg, &td->td_msgport, code); args.sysmsg_fds[0] = 0; args.sysmsg_fds[1] = frame.tf_edx; @@ -1301,7 +1303,6 @@ syscall2(struct trapframe frame) frame.tf_edx = args.sysmsg_fds[1]; frame.tf_eflags &= ~PSL_C; break; - case ERESTART: /* * Reconstruct pc, assuming lcall $X,y is 7 bytes, @@ -1309,10 +1310,10 @@ syscall2(struct trapframe frame) */ frame.tf_eip -= frame.tf_err; break; - case EJUSTRETURN: break; - + case EASYNC: + panic("Unexpected EASYNC return value (for now)"); default: bad: if (p->p_sysent->sv_errsize) { @@ -1373,7 +1374,7 @@ sendsys2(struct trapframe frame) struct proc *p = td->td_proc; register_t orig_tf_eflags; struct sysent *callp; - sysmsg_t sysmsg; + union sysunion *sysun; lwkt_msg_t umsg; u_quad_t sticks; int error; @@ -1408,75 +1409,139 @@ sendsys2(struct trapframe frame) orig_tf_eflags = frame.tf_eflags; result = 0; + /* + * Handle the waitport/waitmsg/checkport/checkmsg case + * + * YYY MOVE THIS TO INT 0x82! We don't really need to combine it + * with sendsys(). + */ + if ((msgsize = frame.tf_edx) <= 0) { + if (frame.tf_ecx) { + printf("waitmsg/checkmsg not yet supported: %08x\n", + frame.tf_ecx); + error = ENOTSUP; + goto bad2; + } + if (frame.tf_eax) { + printf("waitport/checkport only the default port is supported at the moment\n"); + error = ENOTSUP; + goto bad2; + } + switch(msgsize) { + case 0: + /* + * Wait on port for message + */ + sysun = lwkt_getport(&td->td_msgport); + /* XXX block */ + break; + case -1: + /* + * Test port for message + */ + sysun = lwkt_getport(&td->td_msgport); + break; + default: + error = ENOSYS; + goto bad2; + } + if (sysun) { + gd = td->td_gd; + umsg = sysun->lmsg.opaque.ms_umsg; + frame.tf_eax = (register_t)umsg; + if (sysun->lmsg.ms_cleanupmsg) + sysun->lmsg.ms_cleanupmsg(&td->td_msgport, &sysun->lmsg); + atomic_add_int_nonlocked(&td->td_msgport.mp_refs, -1); + sysun->nosys.usrmsg.umsg.u.ms_fds[0] = sysun->lmsg.u.ms_fds[0]; + sysun->nosys.usrmsg.umsg.u.ms_fds[1] = sysun->lmsg.u.ms_fds[1]; + sysun->nosys.usrmsg.umsg.ms_error = sysun->lmsg.ms_error; + error = sysun->lmsg.ms_error; + result = sysun->lmsg.u.ms_fds[0]; /* for ktrace */ + if (error != 0 || code != SYS_execve) { + error = copyout( + &sysun->nosys.usrmsg.umsg.ms_copyout_start, + &umsg->ms_copyout_start, + ms_copyout_size); + } + crit_enter_quick(td); + sysun->lmsg.opaque.ms_sysunnext = gd->gd_freesysun; + gd->gd_freesysun = sysun; + crit_exit_quick(td); + } else { + frame.tf_eax = 0; + } + frame.tf_edx = 0; + code = 0; + error = 0; + goto good; + } + /* * Extract the system call message. If msgsize is zero we are - * blocking on a message and/or message port. YYY + * blocking on a message and/or message port. If msgsize is -1 + * we are testing a message for completion or a message port for + * activity. * * The userland system call message size includes the size of the - * userland lwkt_msg plus arguments. + * userland lwkt_msg plus arguments. We load it into the userland + * portion of our sysunion structure then we initialize the kerneland + * portion and go. */ - if ((msgsize = frame.tf_edx) == 0) { - printf("waitport %08x msg %08x\n", frame.tf_eax, frame.tf_ecx); - error = ENOSYS; - goto bad2; - } /* * Bad message size */ - if (msgsize < sizeof(struct lwkt_msg) || - msgsize > sizeof(struct lwkt_msg) + sizeof(union sysunion) - sizeof(union sysmsg)) { + if (msgsize < sizeof(struct lwkt_msg) || + msgsize > sizeof(union sysunion) - sizeof(union sysmsg) + ) { error = ENOSYS; goto bad2; } /* - * Obtain a sysmsg from our per-cpu cache or allocate a new one. Use + * Obtain a sysun from our per-cpu cache or allocate a new one. Use * the opaque field to store the original (user) message pointer. * A critical section is necessary to interlock against interrupts * returning system messages to the thread cache. - * - * The sysmsg is actually larger (i.e. sizeof(union sysunion)), in - * order to hold the syscall arguments. */ gd = td->td_gd; crit_enter_quick(td); - if ((sysmsg = gd->gd_freesysmsg) != NULL) { - gd->gd_freesysmsg = sysmsg->sm_msg.opaque.ms_sysnext; + if ((sysun = gd->gd_freesysun) != NULL) { + gd->gd_freesysun = sysun->lmsg.opaque.ms_sysunnext; crit_exit_quick(td); } else { crit_exit_quick(td); - sysmsg = malloc(sizeof(union sysunion), M_SYSMSG, M_WAITOK); + sysun = malloc(sizeof(union sysunion), M_SYSMSG, M_WAITOK); } + atomic_add_int_nonlocked(&td->td_msgport.mp_refs, 1); /* - * Copy the user request in. YYY if the userland lwkt_msg is - * different from the kernel lwkt_msg, this is where we deal with - * it. + * Copy the user request into the kernel copy of the user request. */ umsg = (void *)frame.tf_ecx; - error = copyin(umsg, &sysmsg->sm_msg, sizeof(struct lwkt_msg)); + error = copyin(umsg, &sysun->nosys.usrmsg, msgsize); if (error) goto bad1; - if (msgsize > sizeof(struct lwkt_msg)) { - int rsize = msgsize - sizeof(struct lwkt_msg); - error = copyin(umsg + 1, sysmsg + 1, rsize); - if (error) - goto bad1; + if ((sysun->nosys.usrmsg.umsg.ms_flags & MSGF_ASYNC) && + (error = suser(td)) != 0 + ) { + goto bad1; } /* - * Initialize the parts of the message required for kernel sanity. + * Initialize the kernel message from the copied-in data and + * pull in appropriate flags from the userland message. */ - sysmsg->sm_msg.opaque.ms_umsg = umsg; - sysmsg->sm_msg.ms_reply_port = &td->td_msgport; - sysmsg->sm_msg.ms_flags &= MSGF_ASYNC; + lwkt_initmsg(&sysun->lmsg, &td->td_msgport, + sysun->nosys.usrmsg.umsg.ms_cmd); + sysun->lmsg.opaque.ms_umsg = umsg; + sysun->lmsg.ms_flags |= sysun->nosys.usrmsg.umsg.ms_flags & MSGF_ASYNC; /* * Extract the system call number, lookup the system call, and * set the default return value. */ - code = (u_int)sysmsg->sm_msg.ms_cmd; + code = (u_int)sysun->lmsg.ms_cmd; if (code >= p->p_sysent->sv_size) { error = ENOSYS; goto bad1; @@ -1488,11 +1553,11 @@ sendsys2(struct trapframe frame) #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) { - ktrsyscall(p->p_tracep, code, narg, (void *)(&sysmsg + 1)); + ktrsyscall(p->p_tracep, code, narg, (void *)(&sysun->nosys.usrmsg + 1)); } #endif - sysmsg->sm_msg.u.ms_fds[0] = 0; - sysmsg->sm_msg.u.ms_fds[1] = 0; + sysun->lmsg.u.ms_fds[0] = 0; + sysun->lmsg.u.ms_fds[1] = 0; STOPEVENT(p, S_SCE, narg); /* MP aware */ @@ -1506,7 +1571,7 @@ sendsys2(struct trapframe frame) * should never 'return' from this call, it should go right to the * fork_trampoline function. */ - error = (*callp->sy_call)(sysmsg); + error = (*callp->sy_call)(sysun); gd = td->td_gd; /* RELOAD, might have switched cpus */ bad1: @@ -1517,18 +1582,26 @@ bad1: * YYY Don't writeback message if execve() YYY */ if (error != EASYNC) { - result = sysmsg->sm_msg.u.ms_fds[0]; - if (error == 0 && code != SYS_execve) { - error = suword(&umsg->u.ms_result32 + 0, sysmsg->sm_msg.u.ms_fds[0]); - error = suword(&umsg->u.ms_result32 + 1, sysmsg->sm_msg.u.ms_fds[1]); + atomic_add_int_nonlocked(&td->td_msgport.mp_refs, -1); + sysun->nosys.usrmsg.umsg.u.ms_fds[0] = sysun->lmsg.u.ms_fds[0]; + sysun->nosys.usrmsg.umsg.u.ms_fds[1] = sysun->lmsg.u.ms_fds[1]; + result = sysun->nosys.usrmsg.umsg.u.ms_fds[0]; /* for ktrace */ + if (error != 0 || code != SYS_execve) { + int error2; + error2 = copyout(&sysun->nosys.usrmsg.umsg.ms_copyout_start, + &umsg->ms_copyout_start, + ms_copyout_size); + if (error == 0) + error2 = error; } crit_enter_quick(td); - sysmsg->sm_msg.opaque.ms_sysnext = gd->gd_freesysmsg; - gd->gd_freesysmsg = sysmsg; + sysun->lmsg.opaque.ms_sysunnext = gd->gd_freesysun; + gd->gd_freesysun = sysun; crit_exit_quick(td); } bad2: frame.tf_eax = error; +good: /* * Traced syscall. trapsignal() is not MP aware. diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index a8f9ab8b61..9f71a2a15c 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/kern/init_sysent.c,v 1.6 2003/07/30 00:19:14 dillon Exp $ + * $DragonFly: src/sys/kern/init_sysent.c,v 1.7 2003/08/12 02:36:15 dillon Exp $ * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ @@ -12,7 +12,7 @@ #include #include -#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg)) / sizeof(register_t)) +#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg) - sizeof(union usrmsg)) / sizeof(register_t)) #ifdef COMPAT_43 #define compat(n, name) n, (sy_call_t *)__CONCAT(o,name) diff --git a/sys/kern/kern_device.c b/sys/kern/kern_device.c index f457dc211f..256c1bf916 100644 --- a/sys/kern/kern_device.c +++ b/sys/kern/kern_device.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/kern_device.c,v 1.3 2003/07/24 23:52:38 dillon Exp $ + * $DragonFly: src/sys/kern/kern_device.c,v 1.4 2003/08/12 02:36:15 dillon Exp $ */ #include #include @@ -186,7 +186,7 @@ _init_cdevmsg(dev_t dev, cdevmsg_t msg, int cmd) { struct cdevsw *csw; - lwkt_initmsg(&msg->msg, cmd); + lwkt_initmsg(&msg->msg, &curthread->td_msgport, cmd); msg->dev = dev; msg->csw = csw = _devsw(dev); if (csw != NULL) { /* YYY too hackish */ diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 73d55264dd..618f21eb67 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.8 2003/07/28 04:29:12 hmp Exp $ + * $DragonFly: src/sys/kern/kern_time.c,v 1.9 2003/08/12 02:36:15 dillon Exp $ */ #include @@ -49,6 +49,7 @@ #include #include #include +#include struct timezone tz; @@ -234,29 +235,87 @@ nanosleep1(struct timespec *rqt, struct timespec *rmt) } } +static void nanosleep_done(void *arg); +static void nanosleep_return(lwkt_port_t port, lwkt_msg_t msg); + /* ARGSUSED */ int nanosleep(struct nanosleep_args *uap) { - struct timespec rmt, rqt; - int error, error2; + int error; + struct sysmsg_sleep *sysmsg = &uap->sysmsg.sm_sleep; - error = copyin(SCARG(uap, rqtp), &rqt, sizeof(rqt)); + error = copyin(uap->rqtp, &sysmsg->rqt, sizeof(sysmsg->rqt)); if (error) return (error); - if (SCARG(uap, rmtp)) - if (!useracc((caddr_t)SCARG(uap, rmtp), sizeof(rmt), - VM_PROT_WRITE)) - return (EFAULT); - error = nanosleep1(&rqt, &rmt); - if (error && SCARG(uap, rmtp)) { - error2 = copyout(&rmt, SCARG(uap, rmtp), sizeof(rmt)); - if (error2) /* XXX shouldn't happen, did useracc() above */ - return (error2); + /* + * YYY clean this up to always use the callout, note that an abort + * implementation should record the residual in the async case. + */ + if (sysmsg->lmsg.ms_flags & MSGF_ASYNC) { + quad_t ticks; + + ticks = (quad_t)sysmsg->rqt.tv_nsec * hz / 1000000000LL; + if (sysmsg->rqt.tv_sec) + ticks += (quad_t)sysmsg->rqt.tv_sec * hz; + if (ticks <= 0) { + if (ticks == 0) + error = 0; + else + error = EINVAL; + } else { + sysmsg->lmsg.ms_cleanupmsg = nanosleep_return; + callout_init(&sysmsg->timer); + callout_reset(&sysmsg->timer, ticks, nanosleep_done, uap); + error = EASYNC; + } + } else { + /* + * Old synchronous sleep code, copyout the residual if + * nanosleep was interrupted. + */ + error = nanosleep1(&sysmsg->rqt, &sysmsg->rmt); + if (error && SCARG(uap, rmtp)) + error = copyout(&sysmsg->rmt, SCARG(uap, rmtp), sizeof(sysmsg->rmt)); } return (error); } +/* + * Asynch completion for the nanosleep() syscall. This function may be + * called from any context and cannot legally access the originating + * thread, proc, or its user space. + * + * YYY change the callout interface API so we can simply assign the replymsg + * function to it directly. + */ +static void +nanosleep_done(void *arg) +{ + struct nanosleep_args *uap = arg; + + lwkt_replymsg(&uap->sysmsg.lmsg, 0); +} + +/* + * Asynch return for the nanosleep() syscall, called in the context of the + * originating thread when it pulls the message off the reply port. This + * function is responsible for any copyouts to userland. Kernel threads + * which do their own internal system calls will not usually call the return + * function. + */ +static void +nanosleep_return(lwkt_port_t port, lwkt_msg_t msg) +{ + struct nanosleep_args *uap = (void *)msg; + struct sysmsg_sleep *sysmsg = &uap->sysmsg.sm_sleep; + + if (sysmsg->lmsg.ms_error && uap->rmtp) { + sysmsg->lmsg.ms_error = + copyout(&sysmsg->rmt, uap->rmtp, sizeof(sysmsg->rmt)); + } +} + /* ARGSUSED */ int gettimeofday(struct gettimeofday_args *uap) diff --git a/sys/kern/lwkt_msgport.c b/sys/kern/lwkt_msgport.c index 3f172fc162..4e99e8d3c4 100644 --- a/sys/kern/lwkt_msgport.c +++ b/sys/kern/lwkt_msgport.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/lwkt_msgport.c,v 1.4 2003/07/25 05:26:50 dillon Exp $ + * $DragonFly: src/sys/kern/lwkt_msgport.c,v 1.5 2003/08/12 02:36:15 dillon Exp $ */ #include @@ -68,8 +68,7 @@ static void lwkt_abortport_remote(lwkt_port_t port); void lwkt_initmsg_td(lwkt_msg_t msg, thread_t td) { - lwkt_initmsg(msg, 0); - msg->ms_reply_port = &td->td_msgport; + lwkt_initmsg(msg, &td->td_msgport, 0); } /* diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index 0f5f2d794d..6b610b34ec 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.7 2003/07/30 00:19:14 dillon Exp $ +# $DragonFly: src/sys/kern/makesyscalls.sh,v 1.8 2003/08/12 02:36:15 dillon Exp $ set -e @@ -138,8 +138,10 @@ s/\$//g printf " * created from%s\n */\n\n", $0 > syshide printf " * created from%s\n */\n\n", $0 > sysun printf "union sysunion {\n" > sysun + printf "#ifdef _KERNEL /* header only applies in kernel */\n" > sysun printf "\tstruct\tlwkt_msg lmsg;\n" > sysun printf "\tunion\tsysmsg sysmsg;\n" > sysun + printf "#endif\n" > sysun next } NF == 0 || $1 ~ /^;/ { @@ -299,7 +301,10 @@ s/\$//g if (argc != 0 && $2 != "NOARGS" && $2 != "NOPROTO") { printf("\tstruct\t%s %s;\n", argalias, usefuncname) > sysun printf("struct\t%s {\n", argalias) > sysarg + printf("#ifdef _KERNEL\n") > sysarg printf("\tunion sysmsg sysmsg;\n") > sysarg + printf("#endif\n") > sysarg + printf("\tunion usrmsg usrmsg;\n") > sysarg for (i = 1; i <= argc; i++) printf("\t%s\t%s;\tchar %s_[PAD_(%s)];\n", argtype[i], argname[i], @@ -310,7 +315,10 @@ s/\$//g $2 != "NODEF") { printf("\tstruct\t%s %s;\n", argalias, usefuncname) > sysun printf("struct\t%s {\n", argalias) > sysarg + printf("#ifdef _KERNEL\n") > sysarg printf("\tunion sysmsg sysmsg;\n") > sysarg + printf("#endif\n") > sysarg + printf("\tunion usrmsg usrmsg;\n") > sysarg printf("\tregister_t dummy;\n") > sysarg printf("};\n") > sysarg } @@ -358,7 +366,10 @@ s/\$//g printf("\tstruct\t%s %s;\n", argalias, usefuncname) > sysun printf("#endif\n") > sysun printf("struct\t%s {\n", argalias) > syscompat + printf("#ifdef _KERNEL\n") > syscompat printf("\tunion sysmsg sysmsg;\n") > syscompat + printf("#endif\n") > syscompat + printf("\tunion usrmsg usrmsg;\n") > syscompat for (i = 1; i <= argc; i++) printf("\t%s\t%s;\tchar %s_[PAD_(%s)];\n", argtype[i], argname[i], @@ -368,7 +379,10 @@ s/\$//g else if($2 != "CPT_NOA") { printf("\tstruct\t%s %s;\n", argalias, usefuncname) > sysun printf("struct\t%s {\n", argalias) > sysarg + printf("#ifdef _KERNEL\n") > sysarg printf("\tunion sysmsg sysmsg;\n") > sysarg + printf("#endif\n") > sysarg + printf("\tunion usrmsg usrmsg;\n") > sysarg printf("\tregister_t dummy;\n") > sysarg printf("};\n") > sysarg } @@ -435,7 +449,7 @@ s/\$//g exit 1 } END { - printf "\n#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg)) / sizeof(register_t))\n" > sysinc + printf "\n#define AS(name) ((sizeof(struct name) - sizeof(union sysmsg) - sizeof(union usrmsg)) / sizeof(register_t))\n" > sysinc if (ncompat != 0) { printf "#include \"opt_compat.h\"\n\n" > syssw printf "\n#ifdef %s\n", compat > sysinc diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 5ea2ad575a..fb8c01241c 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/kern/syscalls.c,v 1.6 2003/07/30 00:19:14 dillon Exp $ + * $DragonFly: src/sys/kern/syscalls.c,v 1.7 2003/08/12 02:36:15 dillon Exp $ * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ diff --git a/sys/platform/pc32/i386/trap.c b/sys/platform/pc32/i386/trap.c index facf69f2e6..c671d8cad7 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.31 2003/08/07 21:17:22 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/trap.c,v 1.32 2003/08/12 02:36:15 dillon Exp $ */ /* @@ -100,6 +100,7 @@ #include #include +#include #include int (*pmath_emulate) __P((struct trapframe *)); @@ -1219,7 +1220,7 @@ syscall2(struct trapframe frame) /* * The prep code is not MP aware. */ - (*p->p_sysent->sv_prepsyscall)(&frame, (int *)(&args.sysmsg + 1), &code, ¶ms); + (*p->p_sysent->sv_prepsyscall)(&frame, (int *)(&args.nosys.usrmsg + 1), &code, ¶ms); } else { /* * Need to check if this is a 32 bit or 64 bit syscall. @@ -1254,11 +1255,11 @@ syscall2(struct trapframe frame) /* * copyin is MP aware, but the tracing code is not */ - if (params && (i = narg * sizeof(int)) && - (error = copyin(params, (caddr_t)(&args.sysmsg + 1), (u_int)i))) { + if (params && (i = narg * sizeof(register_t)) && + (error = copyin(params, (caddr_t)(&args.nosys.usrmsg + 1), (u_int)i))) { #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(p->p_tracep, code, narg, (void *)(&args.sysmsg + 1)); + ktrsyscall(p->p_tracep, code, narg, (void *)(&args.nosys.usrmsg + 1)); #endif goto bad; } @@ -1277,9 +1278,10 @@ syscall2(struct trapframe frame) #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) { - ktrsyscall(p->p_tracep, code, narg, (void *)(&args.sysmsg + 1)); + ktrsyscall(p->p_tracep, code, narg, (void *)(&args.nosys.usrmsg + 1)); } #endif + lwkt_initmsg(&args.lmsg, &td->td_msgport, code); args.sysmsg_fds[0] = 0; args.sysmsg_fds[1] = frame.tf_edx; @@ -1301,7 +1303,6 @@ syscall2(struct trapframe frame) frame.tf_edx = args.sysmsg_fds[1]; frame.tf_eflags &= ~PSL_C; break; - case ERESTART: /* * Reconstruct pc, assuming lcall $X,y is 7 bytes, @@ -1309,10 +1310,10 @@ syscall2(struct trapframe frame) */ frame.tf_eip -= frame.tf_err; break; - case EJUSTRETURN: break; - + case EASYNC: + panic("Unexpected EASYNC return value (for now)"); default: bad: if (p->p_sysent->sv_errsize) { @@ -1373,7 +1374,7 @@ sendsys2(struct trapframe frame) struct proc *p = td->td_proc; register_t orig_tf_eflags; struct sysent *callp; - sysmsg_t sysmsg; + union sysunion *sysun; lwkt_msg_t umsg; u_quad_t sticks; int error; @@ -1408,75 +1409,139 @@ sendsys2(struct trapframe frame) orig_tf_eflags = frame.tf_eflags; result = 0; + /* + * Handle the waitport/waitmsg/checkport/checkmsg case + * + * YYY MOVE THIS TO INT 0x82! We don't really need to combine it + * with sendsys(). + */ + if ((msgsize = frame.tf_edx) <= 0) { + if (frame.tf_ecx) { + printf("waitmsg/checkmsg not yet supported: %08x\n", + frame.tf_ecx); + error = ENOTSUP; + goto bad2; + } + if (frame.tf_eax) { + printf("waitport/checkport only the default port is supported at the moment\n"); + error = ENOTSUP; + goto bad2; + } + switch(msgsize) { + case 0: + /* + * Wait on port for message + */ + sysun = lwkt_getport(&td->td_msgport); + /* XXX block */ + break; + case -1: + /* + * Test port for message + */ + sysun = lwkt_getport(&td->td_msgport); + break; + default: + error = ENOSYS; + goto bad2; + } + if (sysun) { + gd = td->td_gd; + umsg = sysun->lmsg.opaque.ms_umsg; + frame.tf_eax = (register_t)umsg; + if (sysun->lmsg.ms_cleanupmsg) + sysun->lmsg.ms_cleanupmsg(&td->td_msgport, &sysun->lmsg); + atomic_add_int_nonlocked(&td->td_msgport.mp_refs, -1); + sysun->nosys.usrmsg.umsg.u.ms_fds[0] = sysun->lmsg.u.ms_fds[0]; + sysun->nosys.usrmsg.umsg.u.ms_fds[1] = sysun->lmsg.u.ms_fds[1]; + sysun->nosys.usrmsg.umsg.ms_error = sysun->lmsg.ms_error; + error = sysun->lmsg.ms_error; + result = sysun->lmsg.u.ms_fds[0]; /* for ktrace */ + if (error != 0 || code != SYS_execve) { + error = copyout( + &sysun->nosys.usrmsg.umsg.ms_copyout_start, + &umsg->ms_copyout_start, + ms_copyout_size); + } + crit_enter_quick(td); + sysun->lmsg.opaque.ms_sysunnext = gd->gd_freesysun; + gd->gd_freesysun = sysun; + crit_exit_quick(td); + } else { + frame.tf_eax = 0; + } + frame.tf_edx = 0; + code = 0; + error = 0; + goto good; + } + /* * Extract the system call message. If msgsize is zero we are - * blocking on a message and/or message port. YYY + * blocking on a message and/or message port. If msgsize is -1 + * we are testing a message for completion or a message port for + * activity. * * The userland system call message size includes the size of the - * userland lwkt_msg plus arguments. + * userland lwkt_msg plus arguments. We load it into the userland + * portion of our sysunion structure then we initialize the kerneland + * portion and go. */ - if ((msgsize = frame.tf_edx) == 0) { - printf("waitport %08x msg %08x\n", frame.tf_eax, frame.tf_ecx); - error = ENOSYS; - goto bad2; - } /* * Bad message size */ - if (msgsize < sizeof(struct lwkt_msg) || - msgsize > sizeof(struct lwkt_msg) + sizeof(union sysunion) - sizeof(union sysmsg)) { + if (msgsize < sizeof(struct lwkt_msg) || + msgsize > sizeof(union sysunion) - sizeof(union sysmsg) + ) { error = ENOSYS; goto bad2; } /* - * Obtain a sysmsg from our per-cpu cache or allocate a new one. Use + * Obtain a sysun from our per-cpu cache or allocate a new one. Use * the opaque field to store the original (user) message pointer. * A critical section is necessary to interlock against interrupts * returning system messages to the thread cache. - * - * The sysmsg is actually larger (i.e. sizeof(union sysunion)), in - * order to hold the syscall arguments. */ gd = td->td_gd; crit_enter_quick(td); - if ((sysmsg = gd->gd_freesysmsg) != NULL) { - gd->gd_freesysmsg = sysmsg->sm_msg.opaque.ms_sysnext; + if ((sysun = gd->gd_freesysun) != NULL) { + gd->gd_freesysun = sysun->lmsg.opaque.ms_sysunnext; crit_exit_quick(td); } else { crit_exit_quick(td); - sysmsg = malloc(sizeof(union sysunion), M_SYSMSG, M_WAITOK); + sysun = malloc(sizeof(union sysunion), M_SYSMSG, M_WAITOK); } + atomic_add_int_nonlocked(&td->td_msgport.mp_refs, 1); /* - * Copy the user request in. YYY if the userland lwkt_msg is - * different from the kernel lwkt_msg, this is where we deal with - * it. + * Copy the user request into the kernel copy of the user request. */ umsg = (void *)frame.tf_ecx; - error = copyin(umsg, &sysmsg->sm_msg, sizeof(struct lwkt_msg)); + error = copyin(umsg, &sysun->nosys.usrmsg, msgsize); if (error) goto bad1; - if (msgsize > sizeof(struct lwkt_msg)) { - int rsize = msgsize - sizeof(struct lwkt_msg); - error = copyin(umsg + 1, sysmsg + 1, rsize); - if (error) - goto bad1; + if ((sysun->nosys.usrmsg.umsg.ms_flags & MSGF_ASYNC) && + (error = suser(td)) != 0 + ) { + goto bad1; } /* - * Initialize the parts of the message required for kernel sanity. + * Initialize the kernel message from the copied-in data and + * pull in appropriate flags from the userland message. */ - sysmsg->sm_msg.opaque.ms_umsg = umsg; - sysmsg->sm_msg.ms_reply_port = &td->td_msgport; - sysmsg->sm_msg.ms_flags &= MSGF_ASYNC; + lwkt_initmsg(&sysun->lmsg, &td->td_msgport, + sysun->nosys.usrmsg.umsg.ms_cmd); + sysun->lmsg.opaque.ms_umsg = umsg; + sysun->lmsg.ms_flags |= sysun->nosys.usrmsg.umsg.ms_flags & MSGF_ASYNC; /* * Extract the system call number, lookup the system call, and * set the default return value. */ - code = (u_int)sysmsg->sm_msg.ms_cmd; + code = (u_int)sysun->lmsg.ms_cmd; if (code >= p->p_sysent->sv_size) { error = ENOSYS; goto bad1; @@ -1488,11 +1553,11 @@ sendsys2(struct trapframe frame) #ifdef KTRACE if (KTRPOINT(td, KTR_SYSCALL)) { - ktrsyscall(p->p_tracep, code, narg, (void *)(&sysmsg + 1)); + ktrsyscall(p->p_tracep, code, narg, (void *)(&sysun->nosys.usrmsg + 1)); } #endif - sysmsg->sm_msg.u.ms_fds[0] = 0; - sysmsg->sm_msg.u.ms_fds[1] = 0; + sysun->lmsg.u.ms_fds[0] = 0; + sysun->lmsg.u.ms_fds[1] = 0; STOPEVENT(p, S_SCE, narg); /* MP aware */ @@ -1506,7 +1571,7 @@ sendsys2(struct trapframe frame) * should never 'return' from this call, it should go right to the * fork_trampoline function. */ - error = (*callp->sy_call)(sysmsg); + error = (*callp->sy_call)(sysun); gd = td->td_gd; /* RELOAD, might have switched cpus */ bad1: @@ -1517,18 +1582,26 @@ bad1: * YYY Don't writeback message if execve() YYY */ if (error != EASYNC) { - result = sysmsg->sm_msg.u.ms_fds[0]; - if (error == 0 && code != SYS_execve) { - error = suword(&umsg->u.ms_result32 + 0, sysmsg->sm_msg.u.ms_fds[0]); - error = suword(&umsg->u.ms_result32 + 1, sysmsg->sm_msg.u.ms_fds[1]); + atomic_add_int_nonlocked(&td->td_msgport.mp_refs, -1); + sysun->nosys.usrmsg.umsg.u.ms_fds[0] = sysun->lmsg.u.ms_fds[0]; + sysun->nosys.usrmsg.umsg.u.ms_fds[1] = sysun->lmsg.u.ms_fds[1]; + result = sysun->nosys.usrmsg.umsg.u.ms_fds[0]; /* for ktrace */ + if (error != 0 || code != SYS_execve) { + int error2; + error2 = copyout(&sysun->nosys.usrmsg.umsg.ms_copyout_start, + &umsg->ms_copyout_start, + ms_copyout_size); + if (error == 0) + error2 = error; } crit_enter_quick(td); - sysmsg->sm_msg.opaque.ms_sysnext = gd->gd_freesysmsg; - gd->gd_freesysmsg = sysmsg; + sysun->lmsg.opaque.ms_sysunnext = gd->gd_freesysun; + gd->gd_freesysun = sysun; crit_exit_quick(td); } bad2: frame.tf_eax = error; +good: /* * Traced syscall. trapsignal() is not MP aware. diff --git a/sys/sys/globaldata.h b/sys/sys/globaldata.h index b0d698b4eb..7a08161af2 100644 --- a/sys/sys/globaldata.h +++ b/sys/sys/globaldata.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/globaldata.h,v 1.11.2.1 2000/05/16 06:58:10 dillon Exp $ - * $DragonFly: src/sys/sys/globaldata.h,v 1.14 2003/07/30 00:19:16 dillon Exp $ + * $DragonFly: src/sys/sys/globaldata.h,v 1.15 2003/08/12 02:36:15 dillon Exp $ */ #ifndef _SYS_GLOBALDATA_H_ @@ -70,7 +70,7 @@ struct globaldata { struct thread *gd_curthread; int gd_tdfreecount; /* new thread cache */ u_int32_t gd_reqflags; /* (see note above) */ - union sysmsg *gd_freesysmsg; /* free syscall messages */ + union sysunion *gd_freesysun; /* free syscall messages */ TAILQ_HEAD(,thread) gd_tdallq; /* all threads */ TAILQ_HEAD(,thread) gd_tdfreeq; /* new thread cache */ TAILQ_HEAD(,thread) gd_tdrunq[32]; /* runnable threads */ diff --git a/sys/sys/msgport.h b/sys/sys/msgport.h index 5e50b11541..dbc53c82ee 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.6 2003/07/30 00:19:16 dillon Exp $ + * $DragonFly: src/sys/sys/msgport.h,v 1.7 2003/08/12 02:36:15 dillon Exp $ */ #ifndef _SYS_MSGPORT_H_ @@ -27,20 +27,27 @@ typedef TAILQ_HEAD(lwkt_msg_queue, lwkt_msg) lwkt_msg_queue; * threads. See kern/lwkt_msgport.c for documentation on how messages and * ports work. * + * NOTE: ms_cleanupmsg() is typically used to finish up the handling of a + * message in the context of the caller. For example, so a sycall can + * copyout() information to userland. + * * NOTE! 64-bit-align this structure. */ typedef struct lwkt_msg { TAILQ_ENTRY(lwkt_msg) ms_node; /* link node (not always used) */ union { struct lwkt_msg *ms_next; /* chaining / cache */ - union sysmsg *ms_sysnext; /* chaining / cache */ + union sysunion *ms_sysunnext; /* chaining / cache */ struct lwkt_msg *ms_umsg; /* user message (UVA address) */ } opaque; lwkt_port_t ms_target_port; /* only used in certain situations */ lwkt_port_t ms_reply_port; /* asynch replies returned here */ + void (*ms_cleanupmsg)(lwkt_port_t port, lwkt_msg_t msg); + void *ms_unused; /* (alignment) */ int ms_abortreq; /* set asynchronously */ int ms_cmd; int ms_flags; +#define ms_copyout_start ms_error int ms_error; union { void *ms_resultp; /* misc pointer result */ @@ -51,9 +58,12 @@ typedef struct lwkt_msg { int64_t ms_result64; /* 64 bit result */ off_t ms_offset; /* off_t result */ } u; +#define ms_copyout_end ms_pad[0] int ms_pad[2]; /* future use */ } lwkt_msg; +#define ms_copyout_size (offsetof(struct lwkt_msg, ms_copyout_end) - offsetof(struct lwkt_msg, ms_copyout_start)) + #define MSGF_DONE 0x0001 /* asynch message is complete */ #define MSGF_REPLY 0x0002 /* asynch message has been returned */ #define MSGF_QUEUED 0x0004 /* message has been queued sanitychk */ @@ -67,6 +77,7 @@ typedef struct lwkt_msg { typedef struct lwkt_port { lwkt_msg_queue mp_msgq; int mp_flags; + int mp_refs; /* references to port structure */ struct thread *mp_td; int (*mp_beginmsg)(lwkt_port_t port, lwkt_msg_t msg); void (*mp_abortmsg)(lwkt_port_t port, lwkt_msg_t msg); diff --git a/sys/sys/msgport2.h b/sys/sys/msgport2.h index 3390d8a2bb..6e0bc85884 100644 --- a/sys/sys/msgport2.h +++ b/sys/sys/msgport2.h @@ -3,7 +3,7 @@ * * Implements Inlines for LWKT messages and ports. * - * $DragonFly: src/sys/sys/msgport2.h,v 1.2 2003/07/22 17:03:34 dillon Exp $ + * $DragonFly: src/sys/sys/msgport2.h,v 1.3 2003/08/12 02:36:15 dillon Exp $ */ #ifndef _SYS_MSGPORT2_H_ @@ -11,10 +11,21 @@ static __inline void -lwkt_initmsg(lwkt_msg_t msg, int cmd) +lwkt_initmsg(lwkt_msg_t msg, lwkt_port_t rport, int cmd) { msg->ms_cmd = cmd; msg->ms_flags = MSGF_DONE; + msg->ms_reply_port = rport; + msg->ms_cleanupmsg = NULL; +} + +static __inline +void +lwkt_reinitmsg(lwkt_msg_t msg, lwkt_port_t rport) +{ + msg->ms_flags = (msg->ms_flags & MSGF_ASYNC) | MSGF_DONE; + msg->ms_reply_port = rport; + msg->ms_cleanupmsg = NULL; } #ifdef _KERNEL diff --git a/sys/sys/syscall-hide.h b/sys/sys/syscall-hide.h index a2e7137fc4..ea92871476 100644 --- a/sys/sys/syscall-hide.h +++ b/sys/sys/syscall-hide.h @@ -2,7 +2,7 @@ * System call hiders. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/syscall-hide.h,v 1.6 2003/07/30 00:19:16 dillon Exp $ + * $DragonFly: src/sys/sys/syscall-hide.h,v 1.7 2003/08/12 02:36:15 dillon Exp $ * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 7de7d8f242..c5cea5293e 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/syscall.h,v 1.6 2003/07/30 00:19:16 dillon Exp $ + * $DragonFly: src/sys/sys/syscall.h,v 1.7 2003/08/12 02:36:15 dillon Exp $ * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index cfb11f7f36..9833c22df4 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -1,6 +1,6 @@ # DragonFly system call names. # DO NOT EDIT-- this file is automatically generated. -# $DragonFly: src/sys/sys/syscall.mk,v 1.6 2003/07/30 00:19:16 dillon Exp $ +# $DragonFly: src/sys/sys/syscall.mk,v 1.7 2003/08/12 02:36:15 dillon Exp $ # created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp MIASM = \ syscall.o \ diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 5b7a8374c7..ffc55ea0ce 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/sysent.h,v 1.27.2.5 2002/03/17 11:08:38 alfred Exp $ - * $DragonFly: src/sys/sys/sysent.h,v 1.3 2003/06/23 17:55:50 dillon Exp $ + * $DragonFly: src/sys/sys/sysent.h,v 1.4 2003/08/12 02:36:15 dillon Exp $ */ #ifndef _SYS_SYSENT_H_ @@ -115,8 +115,8 @@ DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE) #define SYSCALL_MODULE_HELPER(syscallname) \ static int syscallname##_syscall = SYS_##syscallname; \ static struct sysent syscallname##_sysent = { \ - (sizeof(struct syscallname ## _args ) \ - / sizeof(register_t)), \ + ((sizeof(struct syscallname ## _args ) - sizeof(union sysmsg) - \ + sizeof(union usrmsg)) / sizeof(register_t)), \ (sy_call_t *)& syscallname \ }; \ SYSCALL_MODULE(syscallname, \ diff --git a/sys/sys/sysmsg.h b/sys/sys/sysmsg.h index 8fc6e099d0..94239a0858 100644 --- a/sys/sys/sysmsg.h +++ b/sys/sys/sysmsg.h @@ -1,38 +1,64 @@ /* * SYS/SYSMSG.H * - * $DragonFly: src/sys/sys/sysmsg.h,v 1.1 2003/07/30 00:19:16 dillon Exp $ + * $DragonFly: src/sys/sys/sysmsg.h,v 1.2 2003/08/12 02:36:15 dillon Exp $ */ #ifndef _SYS_SYSMSG_H_ #define _SYS_SYSMSG_H_ +#ifdef _KERNEL + #ifndef _SYS_CALLOUT_H_ #include #endif /* - * The sysmsg structure holds out-of-band information for a system call - * that userland is not aware of and does not have to supply. It typically - * preceeds the syscall arguments in sys/sysunion.h + * The sysmsg holds the kernelland version of a system call. + * It typically preceeds the usrmsg and syscall arguments in sysunion + * (see sys/sysunion.h) */ union sysmsg { - struct lwkt_msg sm_msg; - struct { - struct lwkt_msg msg; + struct lwkt_msg lmsg; + struct sysmsg_sleep { + struct lwkt_msg lmsg; + struct timespec rmt; + struct timespec rqt; struct callout timer; } sm_sleep; }; -#define sysmsg_result sysmsg.sm_msg.u.ms_result -#define sysmsg_lresult sysmsg.sm_msg.u.ms_lresult -#define sysmsg_resultp sysmsg.sm_msg.u.ms_resultp -#define sysmsg_fds sysmsg.sm_msg.u.ms_fds -#define sysmsg_offset sysmsg.sm_msg.u.ms_offset -#define sysmsg_result32 sysmsg.sm_msg.u.ms_result32 -#define sysmsg_result64 sysmsg.sm_msg.u.ms_result64 +#endif + +/* + * The usrmsg holds the userland version of the system call message which + * typically preceeds the original user arguments. This message structure + * is typically loaded by the copyin() and adjusted prior to copyout(), but + * not used in the nominal running of the system call. + */ +union usrmsg { + struct lwkt_msg umsg; +}; +#ifdef _KERNEL typedef union sysmsg *sysmsg_t; +#define sysmsg_result sysmsg.lmsg.u.ms_result +#define sysmsg_lresult sysmsg.lmsg.u.ms_lresult +#define sysmsg_resultp sysmsg.lmsg.u.ms_resultp +#define sysmsg_fds sysmsg.lmsg.u.ms_fds +#define sysmsg_offset sysmsg.lmsg.u.ms_offset +#define sysmsg_result32 sysmsg.lmsg.u.ms_result32 +#define sysmsg_result64 sysmsg.lmsg.u.ms_result64 +#endif + +typedef union usrmsg *usrmsg_t; +#define usrmsg_result usrmsg.umsg.u.ms_result +#define usrmsg_lresult usrmsg.umsg.u.ms_lresult +#define usrmsg_resultp usrmsg.umsg.u.ms_resultp +#define usrmsg_fds usrmsg.umsg.u.ms_fds +#define usrmsg_offset usrmsg.umsg.u.ms_offset +#define usrmsg_result32 usrmsg.umsg.u.ms_result32 +#define usrmsg_result64 usrmsg.umsg.u.ms_result64 #endif diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 402f20482a..b03aa5b438 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/sysproto.h,v 1.6 2003/07/30 00:19:16 dillon Exp $ + * $DragonFly: src/sys/sys/sysproto.h,v 1.7 2003/08/12 02:36:15 dillon Exp $ * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ @@ -21,139 +21,220 @@ 0 : sizeof(register_t) - sizeof(t)) struct nosys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct sys_exit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int rval; char rval_[PAD_(int)]; }; struct fork_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct read_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; void * buf; char buf_[PAD_(void *)]; size_t nbyte; char nbyte_[PAD_(size_t)]; }; struct write_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct close_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; }; struct wait_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char * link; char link_[PAD_(char *)]; }; struct unlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct chdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct fchdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; }; struct mknod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; int dev; char dev_[PAD_(int)]; }; struct chmod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct chown_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int uid; char uid_[PAD_(int)]; int gid; char gid_[PAD_(int)]; }; struct obreak_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * nsize; char nsize_[PAD_(char *)]; }; struct getfsstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct statfs * buf; char buf_[PAD_(struct statfs *)]; long bufsize; char bufsize_[PAD_(long)]; int flags; char flags_[PAD_(int)]; }; struct getpid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct mount_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct setuid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; uid_t uid; char uid_[PAD_(uid_t)]; }; struct getuid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct geteuid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct ptrace_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; struct msghdr * msg; char msg_[PAD_(struct msghdr *)]; int flags; char flags_[PAD_(int)]; }; struct sendmsg_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; caddr_t msg; char msg_[PAD_(caddr_t)]; int flags; char flags_[PAD_(int)]; }; struct recvfrom_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; caddr_t buf; char buf_[PAD_(caddr_t)]; size_t len; char len_[PAD_(size_t)]; @@ -162,246 +243,396 @@ struct recvfrom_args { int * fromlenaddr; char fromlenaddr_[PAD_(int *)]; }; struct accept_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; caddr_t name; char name_[PAD_(caddr_t)]; int * anamelen; char anamelen_[PAD_(int *)]; }; struct getpeername_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fdes; char fdes_[PAD_(int)]; caddr_t asa; char asa_[PAD_(caddr_t)]; int * alen; char alen_[PAD_(int *)]; }; struct getsockname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fdes; char fdes_[PAD_(int)]; caddr_t asa; char asa_[PAD_(caddr_t)]; int * alen; char alen_[PAD_(int *)]; }; struct access_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct chflags_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int flags; char flags_[PAD_(int)]; }; struct fchflags_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int flags; char flags_[PAD_(int)]; }; struct sync_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct kill_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int pid; char pid_[PAD_(int)]; int signum; char signum_[PAD_(int)]; }; struct getppid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct dup_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int fd; char fd_[PAD_(u_int)]; }; struct pipe_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct getegid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct profil_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct getlogin_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * namebuf; char namebuf_[PAD_(char *)]; u_int namelen; char namelen_[PAD_(u_int)]; }; struct setlogin_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * namebuf; char namebuf_[PAD_(char *)]; }; struct acct_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct osigpending_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct sigaltstack_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; stack_t * ss; char ss_[PAD_(stack_t *)]; stack_t * oss; char oss_[PAD_(stack_t *)]; }; struct ioctl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int opt; char opt_[PAD_(int)]; }; struct revoke_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct symlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char * link; char link_[PAD_(char *)]; }; struct readlink_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; char * buf; char buf_[PAD_(char *)]; int count; char count_[PAD_(int)]; }; struct execve_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * fname; char fname_[PAD_(char *)]; char ** argv; char argv_[PAD_(char **)]; char ** envv; char envv_[PAD_(char **)]; }; struct umask_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int newmask; char newmask_[PAD_(int)]; }; struct chroot_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct getpagesize_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct msync_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; void * addr; char addr_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; int flags; char flags_[PAD_(int)]; }; struct vfork_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct sbrk_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int incr; char incr_[PAD_(int)]; }; struct sstk_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int incr; char incr_[PAD_(int)]; }; struct ovadvise_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int anom; char anom_[PAD_(int)]; }; struct munmap_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; void * addr; char addr_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; }; struct mprotect_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; void * addr; char addr_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; int behav; char behav_[PAD_(int)]; }; struct mincore_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int gidsetsize; char gidsetsize_[PAD_(u_int)]; gid_t * gidset; char gidset_[PAD_(gid_t *)]; }; struct setgroups_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int gidsetsize; char gidsetsize_[PAD_(u_int)]; gid_t * gidset; char gidset_[PAD_(gid_t *)]; }; struct getpgrp_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct setpgid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int pid; char pid_[PAD_(int)]; int pgid; char pgid_[PAD_(int)]; }; struct setitimer_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct swapon_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * name; char name_[PAD_(char *)]; }; struct getitimer_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int which; char which_[PAD_(u_int)]; struct itimerval * itv; char itv_[PAD_(struct itimerval *)]; }; struct getdtablesize_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct dup2_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int from; char from_[PAD_(u_int)]; u_int to; char to_[PAD_(u_int)]; }; struct fcntl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; long arg; char arg_[PAD_(long)]; }; struct select_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int nd; char nd_[PAD_(int)]; fd_set * in; char in_[PAD_(fd_set *)]; fd_set * ou; char ou_[PAD_(fd_set *)]; @@ -409,40 +640,61 @@ struct select_args { struct timeval * tv; char tv_[PAD_(struct timeval *)]; }; struct fsync_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; }; struct setpriority_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; int who; char who_[PAD_(int)]; int prio; char prio_[PAD_(int)]; }; struct socket_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int domain; char domain_[PAD_(int)]; int type; char type_[PAD_(int)]; int protocol; char protocol_[PAD_(int)]; }; struct connect_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; caddr_t name; char name_[PAD_(caddr_t)]; int namelen; char namelen_[PAD_(int)]; }; struct getpriority_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; int who; char who_[PAD_(int)]; }; struct bind_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; caddr_t name; char name_[PAD_(caddr_t)]; int namelen; char namelen_[PAD_(int)]; }; struct setsockopt_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; int level; char level_[PAD_(int)]; int name; char name_[PAD_(int)]; @@ -450,22 +702,34 @@ struct setsockopt_args { int valsize; char valsize_[PAD_(int)]; }; struct listen_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; int backlog; char backlog_[PAD_(int)]; }; struct gettimeofday_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct timeval * tp; char tp_[PAD_(struct timeval *)]; struct timezone * tzp; char tzp_[PAD_(struct timezone *)]; }; struct getrusage_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int who; char who_[PAD_(int)]; struct rusage * rusage; char rusage_[PAD_(struct rusage *)]; }; struct getsockopt_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; int level; char level_[PAD_(int)]; int name; char name_[PAD_(int)]; @@ -473,60 +737,93 @@ struct getsockopt_args { int * avalsize; char avalsize_[PAD_(int *)]; }; struct readv_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct timeval * tv; char tv_[PAD_(struct timeval *)]; struct timezone * tzp; char tzp_[PAD_(struct timezone *)]; }; struct fchown_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int uid; char uid_[PAD_(int)]; int gid; char gid_[PAD_(int)]; }; struct fchmod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int mode; char mode_[PAD_(int)]; }; struct setreuid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int ruid; char ruid_[PAD_(int)]; int euid; char euid_[PAD_(int)]; }; struct setregid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int rgid; char rgid_[PAD_(int)]; int egid; char egid_[PAD_(int)]; }; struct rename_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * from; char from_[PAD_(char *)]; char * to; char to_[PAD_(char *)]; }; struct flock_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int how; char how_[PAD_(int)]; }; struct mkfifo_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct sendto_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; caddr_t buf; char buf_[PAD_(caddr_t)]; size_t len; char len_[PAD_(size_t)]; @@ -535,102 +832,162 @@ struct sendto_args { int tolen; char tolen_[PAD_(int)]; }; struct shutdown_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; int how; char how_[PAD_(int)]; }; struct socketpair_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct rmdir_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct utimes_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct adjtime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct timeval * delta; char delta_[PAD_(struct timeval *)]; struct timeval * olddelta; char olddelta_[PAD_(struct timeval *)]; }; struct ogethostid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct setsid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct quotactl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct nfssvc_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int flag; char flag_[PAD_(int)]; caddr_t argp; char argp_[PAD_(caddr_t)]; }; struct statfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct statfs * buf; char buf_[PAD_(struct statfs *)]; }; struct fstatfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct statfs * buf; char buf_[PAD_(struct statfs *)]; }; struct getfh_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * fname; char fname_[PAD_(char *)]; struct fhandle * fhp; char fhp_[PAD_(struct fhandle *)]; }; struct getdomainname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * domainname; char domainname_[PAD_(char *)]; int len; char len_[PAD_(int)]; }; struct setdomainname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * domainname; char domainname_[PAD_(char *)]; int len; char len_[PAD_(int)]; }; struct uname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct utsname * name; char name_[PAD_(struct utsname *)]; }; struct sysarch_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int op; char op_[PAD_(int)]; char * parms; char parms_[PAD_(char *)]; }; struct rtprio_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -638,7 +995,10 @@ struct semsys_args { int a5; char a5_[PAD_(int)]; }; struct msgsys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int which; char which_[PAD_(int)]; int a2; char a2_[PAD_(int)]; int a3; char a3_[PAD_(int)]; @@ -647,14 +1007,20 @@ struct msgsys_args { int a6; char a6_[PAD_(int)]; }; struct shmsys_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; void * buf; char buf_[PAD_(void *)]; size_t nbyte; char nbyte_[PAD_(size_t)]; @@ -662,7 +1028,10 @@ struct pread_args { off_t offset; char offset_[PAD_(off_t)]; }; struct pwrite_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; const void * buf; char buf_[PAD_(const void *)]; size_t nbyte; char nbyte_[PAD_(size_t)]; @@ -670,65 +1039,104 @@ struct pwrite_args { off_t offset; char offset_[PAD_(off_t)]; }; struct ntp_adjtime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct timex * tp; char tp_[PAD_(struct timex *)]; }; struct setgid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; gid_t gid; char gid_[PAD_(gid_t)]; }; struct setegid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; gid_t egid; char egid_[PAD_(gid_t)]; }; struct seteuid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; uid_t euid; char euid_[PAD_(uid_t)]; }; struct stat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct stat * ub; char ub_[PAD_(struct stat *)]; }; struct fstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct stat * sb; char sb_[PAD_(struct stat *)]; }; struct lstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct stat * ub; char ub_[PAD_(struct stat *)]; }; struct pathconf_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int name; char name_[PAD_(int)]; }; struct fpathconf_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int name; char name_[PAD_(int)]; }; struct __getrlimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int which; char which_[PAD_(u_int)]; struct rlimit * rlp; char rlp_[PAD_(struct rlimit *)]; }; struct __setrlimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int which; char which_[PAD_(u_int)]; struct rlimit * rlp; char rlp_[PAD_(struct rlimit *)]; }; struct getdirentries_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; caddr_t addr; char addr_[PAD_(caddr_t)]; size_t len; char len_[PAD_(size_t)]; int prot; char prot_[PAD_(int)]; @@ -738,26 +1146,38 @@ struct mmap_args { off_t pos; char pos_[PAD_(off_t)]; }; struct lseek_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int pad; char pad_[PAD_(int)]; off_t length; char length_[PAD_(off_t)]; }; struct ftruncate_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int pad; char pad_[PAD_(int)]; off_t length; char length_[PAD_(off_t)]; }; struct sysctl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int * name; char name_[PAD_(int *)]; u_int namelen; char namelen_[PAD_(u_int)]; void * old; char old_[PAD_(void *)]; @@ -766,73 +1186,112 @@ struct sysctl_args { size_t newlen; char newlen_[PAD_(size_t)]; }; struct mlock_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const void * addr; char addr_[PAD_(const void *)]; size_t len; char len_[PAD_(size_t)]; }; struct munlock_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const void * addr; char addr_[PAD_(const void *)]; size_t len; char len_[PAD_(size_t)]; }; struct undelete_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; }; struct futimes_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct getpgid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; pid_t pid; char pid_[PAD_(pid_t)]; }; struct poll_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; key_t key; char key_[PAD_(key_t)]; int nsems; char nsems_[PAD_(int)]; int semflg; char semflg_[PAD_(int)]; }; struct semop_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; key_t key; char key_[PAD_(key_t)]; int msgflg; char msgflg_[PAD_(int)]; }; struct msgsnd_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int msqid; char msqid_[PAD_(int)]; void * msgp; char msgp_[PAD_(void *)]; size_t msgsz; char msgsz_[PAD_(size_t)]; @@ -840,407 +1299,650 @@ struct msgrcv_args { int msgflg; char msgflg_[PAD_(int)]; }; struct shmat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int shmid; char shmid_[PAD_(int)]; void * shmaddr; char shmaddr_[PAD_(void *)]; int shmflg; char shmflg_[PAD_(int)]; }; struct shmctl_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; void * shmaddr; char shmaddr_[PAD_(void *)]; }; struct shmget_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; key_t key; char key_[PAD_(key_t)]; int size; char size_[PAD_(int)]; int shmflg; char shmflg_[PAD_(int)]; }; struct clock_gettime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; struct timespec * tp; char tp_[PAD_(struct timespec *)]; }; struct clock_settime_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; const struct timespec * tp; char tp_[PAD_(const struct timespec *)]; }; struct clock_getres_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; clockid_t clock_id; char clock_id_[PAD_(clockid_t)]; struct timespec * tp; char tp_[PAD_(struct timespec *)]; }; struct nanosleep_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const struct timespec * rqtp; char rqtp_[PAD_(const struct timespec *)]; struct timespec * rmtp; char rmtp_[PAD_(struct timespec *)]; }; struct minherit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; void * addr; char addr_[PAD_(void *)]; size_t len; char len_[PAD_(size_t)]; int inherit; char inherit_[PAD_(int)]; }; struct rfork_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int flags; char flags_[PAD_(int)]; }; struct openbsd_poll_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct lchown_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int uid; char uid_[PAD_(int)]; int gid; char gid_[PAD_(int)]; }; struct getdents_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; char * buf; char buf_[PAD_(char *)]; size_t count; char count_[PAD_(size_t)]; }; struct lchmod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; mode_t mode; char mode_[PAD_(mode_t)]; }; struct lutimes_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct timeval * tptr; char tptr_[PAD_(struct timeval *)]; }; struct nstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct nstat * ub; char ub_[PAD_(struct nstat *)]; }; struct nfstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct nstat * sb; char sb_[PAD_(struct nstat *)]; }; struct nlstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct nstat * ub; char ub_[PAD_(struct nstat *)]; }; struct fhstatfs_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const struct fhandle * u_fhp; char u_fhp_[PAD_(const struct fhandle *)]; struct statfs * buf; char buf_[PAD_(struct statfs *)]; }; struct fhopen_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const struct fhandle * u_fhp; char u_fhp_[PAD_(const struct fhandle *)]; int flags; char flags_[PAD_(int)]; }; struct fhstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const struct fhandle * u_fhp; char u_fhp_[PAD_(const struct fhandle *)]; struct stat * sb; char sb_[PAD_(struct stat *)]; }; struct modnext_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int modid; char modid_[PAD_(int)]; }; struct modstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int modid; char modid_[PAD_(int)]; struct module_stat * stat; char stat_[PAD_(struct module_stat *)]; }; struct modfnext_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int modid; char modid_[PAD_(int)]; }; struct modfind_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const char * name; char name_[PAD_(const char *)]; }; struct kldload_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const char * file; char file_[PAD_(const char *)]; }; struct kldunload_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fileid; char fileid_[PAD_(int)]; }; struct kldfind_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const char * file; char file_[PAD_(const char *)]; }; struct kldnext_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fileid; char fileid_[PAD_(int)]; }; struct kldstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fileid; char fileid_[PAD_(int)]; struct kld_file_stat * stat; char stat_[PAD_(struct kld_file_stat *)]; }; struct kldfirstmod_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fileid; char fileid_[PAD_(int)]; }; struct getsid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; pid_t pid; char pid_[PAD_(pid_t)]; }; struct setresuid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_suspend_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_error_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_read_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct aio_write_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct aiocb * aiocbp; char aiocbp_[PAD_(struct aiocb *)]; }; struct lio_listio_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct thr_sleep_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const struct timespec * timeout; char timeout_[PAD_(const struct timespec *)]; }; struct thr_wakeup_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; pid_t pid; char pid_[PAD_(pid_t)]; }; struct mlockall_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int how; char how_[PAD_(int)]; }; struct munlockall_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct __getcwd_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_char * buf; char buf_[PAD_(u_char *)]; u_int buflen; char buflen_[PAD_(u_int)]; }; struct sched_setparam_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; pid_t pid; char pid_[PAD_(pid_t)]; const struct sched_param * param; char param_[PAD_(const struct sched_param *)]; }; struct sched_getparam_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; pid_t pid; char pid_[PAD_(pid_t)]; struct sched_param * param; char param_[PAD_(struct sched_param *)]; }; struct sched_setscheduler_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; pid_t pid; char pid_[PAD_(pid_t)]; }; struct sched_yield_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct sched_get_priority_max_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int policy; char policy_[PAD_(int)]; }; struct sched_get_priority_min_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int policy; char policy_[PAD_(int)]; }; struct sched_rr_get_interval_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; pid_t pid; char pid_[PAD_(pid_t)]; struct timespec * interval; char interval_[PAD_(struct timespec *)]; }; struct utrace_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const void * addr; char addr_[PAD_(const void *)]; size_t len; char len_[PAD_(size_t)]; }; struct kldsym_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fileid; char fileid_[PAD_(int)]; int cmd; char cmd_[PAD_(int)]; void * data; char data_[PAD_(void *)]; }; struct jail_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct jail * jail; char jail_[PAD_(struct jail *)]; }; struct sigprocmask_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const sigset_t * sigmask; char sigmask_[PAD_(const sigset_t *)]; }; struct sigaction_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; sigset_t * set; char set_[PAD_(sigset_t *)]; }; struct sigreturn_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; ucontext_t * sigcntxp; char sigcntxp_[PAD_(ucontext_t *)]; }; struct __acl_get_file_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const char * path; char path_[PAD_(const char *)]; acl_type_t type; char type_[PAD_(acl_type_t)]; }; struct __acl_delete_fd_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int filedes; char filedes_[PAD_(int)]; acl_type_t type; char type_[PAD_(acl_type_t)]; }; struct __acl_aclcheck_file_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; const char * path; char path_[PAD_(const char *)]; const char * attrname; char attrname_[PAD_(const char *)]; }; struct aio_waitcomplete_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct aiocb ** aiocbp; char aiocbp_[PAD_(struct aiocb **)]; struct timespec * timeout; char timeout_[PAD_(struct timespec *)]; }; struct getresuid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; register_t dummy; }; struct kevent_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; const struct kevent * changelist; char changelist_[PAD_(const struct kevent *)]; int nchanges; char nchanges_[PAD_(int)]; @@ -1249,7 +1951,10 @@ struct kevent_args { const struct timespec * timeout; char timeout_[PAD_(const struct timespec *)]; }; struct sendfile_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; int s; char s_[PAD_(int)]; off_t offset; char offset_[PAD_(off_t)]; @@ -1498,51 +2203,78 @@ int sendfile __P((struct sendfile_args *)); #ifdef COMPAT_43 struct ocreat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; int mode; char mode_[PAD_(int)]; }; struct olseek_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; long offset; char offset_[PAD_(long)]; int whence; char whence_[PAD_(int)]; }; struct ostat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct ostat * ub; char ub_[PAD_(struct ostat *)]; }; struct olstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; struct ostat * ub; char ub_[PAD_(struct ostat *)]; }; struct osigaction_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int how; char how_[PAD_(int)]; osigset_t mask; char mask_[PAD_(osigset_t)]; }; struct ofstat_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; struct ostat * sb; char sb_[PAD_(struct ostat *)]; }; struct getkerninfo_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; void * addr; char addr_[PAD_(void *)]; int len; char len_[PAD_(int)]; int prot; char prot_[PAD_(int)]; @@ -1551,112 +2283,175 @@ struct ommap_args { long pos; char pos_[PAD_(long)]; }; struct gethostname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * hostname; char hostname_[PAD_(char *)]; u_int len; char len_[PAD_(u_int)]; }; struct sethostname_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * hostname; char hostname_[PAD_(char *)]; u_int len; char len_[PAD_(u_int)]; }; struct osend_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct osigcontext * sigcntxp; char sigcntxp_[PAD_(struct osigcontext *)]; }; struct osigvec_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int mask; char mask_[PAD_(int)]; }; struct osigsetmask_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int mask; char mask_[PAD_(int)]; }; struct osigsuspend_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; osigset_t mask; char mask_[PAD_(osigset_t)]; }; struct osigstack_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; struct sigstack * nss; char nss_[PAD_(struct sigstack *)]; struct sigstack * oss; char oss_[PAD_(struct sigstack *)]; }; struct orecvmsg_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; struct omsghdr * msg; char msg_[PAD_(struct omsghdr *)]; int flags; char flags_[PAD_(int)]; }; struct osendmsg_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int s; char s_[PAD_(int)]; caddr_t msg; char msg_[PAD_(caddr_t)]; int flags; char flags_[PAD_(int)]; }; struct otruncate_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; char * path; char path_[PAD_(char *)]; long length; char length_[PAD_(long)]; }; struct oftruncate_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fd; char fd_[PAD_(int)]; long length; char length_[PAD_(long)]; }; struct ogetpeername_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int fdes; char fdes_[PAD_(int)]; caddr_t asa; char asa_[PAD_(caddr_t)]; int * alen; char alen_[PAD_(int *)]; }; struct osethostid_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; long hostid; char hostid_[PAD_(long)]; }; struct ogetrlimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int which; char which_[PAD_(u_int)]; struct orlimit * rlp; char rlp_[PAD_(struct orlimit *)]; }; struct osetrlimit_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; u_int which; char which_[PAD_(u_int)]; struct orlimit * rlp; char rlp_[PAD_(struct orlimit *)]; }; struct okillpg_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; int pgid; char pgid_[PAD_(int)]; int signum; char signum_[PAD_(int)]; }; struct ogetdirentries_args { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 { +#ifdef _KERNEL union sysmsg sysmsg; +#endif + union usrmsg usrmsg; 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 index af69d3dce8..03cfeb43d3 100644 --- a/sys/sys/sysunion.h +++ b/sys/sys/sysunion.h @@ -2,13 +2,15 @@ * Union of syscall args for messaging. * * DO NOT EDIT-- this file is automatically generated. - * $DragonFly: src/sys/sys/sysunion.h,v 1.3 2003/07/30 00:19:16 dillon Exp $ + * $DragonFly: src/sys/sys/sysunion.h,v 1.4 2003/08/12 02:36:15 dillon Exp $ * created from DragonFly: src/sys/kern/syscalls.master,v 1.2 2003/06/17 04:28:41 dillon Exp */ union sysunion { +#ifdef _KERNEL /* header only applies in kernel */ struct lwkt_msg lmsg; union sysmsg sysmsg; +#endif struct nosys_args nosys; struct sys_exit_args sys_exit; struct fork_args fork; -- 2.41.0