syscall messaging 2: Change the standard return value storage for system
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 26 Jul 2003 18:12:47 +0000 (18:12 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 26 Jul 2003 18:12:47 +0000 (18:12 +0000)
commit90b9818c951c3ddeff348cc5836a1e40fccaa9eb
treeff4f36ea9474f14ce89cd7ded8b8fe0fdbca6d33
parent44d74c5c2dd2d9972315744f6dd89e4e7e1f0858
syscall messaging 2: Change the standard return value storage for system
calls from proc->p_retval[] to the message structure embedded in the syscall.
System calls used to set their non-error return value in p_retval[] but
must now set it in the message structure.  This is a necessary precursor to
any sort of asynchronizatino, for obvious reasons.

This work was particularly annoying because all the emualtion code declares
and manually fills in syscall argument structures.

This commit could potentially destabilize some of the emulation code but I
went through the most important Linux emulation code three times and tested it
with linux-mozilla, so I am fairly confident that I got it right.

Note: proper linux emulation requires setting the fallback elf brand to 3 or
it will default to SVR4.  It really ought to default to linux (3), not SVR4.

    sysctl -w kern.fallback_elf_brand=3
65 files changed:
sys/dev/misc/streams/streams.c
sys/emulation/ibcs2/i386/ibcs2_fcntl.c
sys/emulation/ibcs2/i386/ibcs2_misc.c
sys/emulation/ibcs2/i386/ibcs2_msg.c
sys/emulation/ibcs2/i386/ibcs2_other.c
sys/emulation/ibcs2/i386/ibcs2_signal.c
sys/emulation/ibcs2/i386/ibcs2_sysi86.c
sys/emulation/ibcs2/i386/ibcs2_util.h
sys/emulation/ibcs2/i386/ibcs2_xenix.c
sys/emulation/ibcs2/i386/ibcs2_xenix.h
sys/emulation/linux/i386/linux_machdep.c
sys/emulation/linux/i386/linux_ptrace.c
sys/emulation/linux/i386/linux_sysvec.c
sys/emulation/linux/linux_file.c
sys/emulation/linux/linux_getcwd.c
sys/emulation/linux/linux_ipc.c
sys/emulation/linux/linux_ipc.h
sys/emulation/linux/linux_misc.c
sys/emulation/linux/linux_signal.c
sys/emulation/linux/linux_signal.h
sys/emulation/linux/linux_socket.c
sys/emulation/linux/linux_uid16.c
sys/emulation/posix4/p1003_1b.c
sys/emulation/svr4/svr4_fcntl.c
sys/emulation/svr4/svr4_filio.c
sys/emulation/svr4/svr4_ioctl.c
sys/emulation/svr4/svr4_ipc.c
sys/emulation/svr4/svr4_misc.c
sys/emulation/svr4/svr4_signal.c
sys/emulation/svr4/svr4_stat.c
sys/emulation/svr4/svr4_stream.c
sys/i386/i386/machdep.c
sys/i386/i386/sys_machdep.c
sys/i386/i386/trap.c
sys/kern/kern_descrip.c
sys/kern/kern_event.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_linker.c
sys/kern/kern_module.c
sys/kern/kern_ntptime.c
sys/kern/kern_p1003_1b.c
sys/kern/kern_prot.c
sys/kern/kern_resource.c
sys/kern/kern_sig.c
sys/kern/kern_sysctl.c
sys/kern/kern_threads.c
sys/kern/kern_xxx.c
sys/kern/sys_generic.c
sys/kern/sys_pipe.c
sys/kern/sys_process.c
sys/kern/sysv_msg.c
sys/kern/sysv_sem.c
sys/kern/sysv_shm.c
sys/kern/uipc_syscalls.c
sys/kern/vfs_aio.c
sys/kern/vfs_syscalls.c
sys/netproto/ncp/ncp_mod.c
sys/platform/pc32/i386/machdep.c
sys/platform/pc32/i386/sys_machdep.c
sys/platform/pc32/i386/trap.c
sys/sys/msgport.h
sys/sys/proc.h
sys/sys/ptrace.h
sys/vm/vm_mmap.c