Syscall messaging work 2: Continue with the implementation of sendsys(),
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 24 Jul 2003 23:52:39 +0000 (23:52 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 24 Jul 2003 23:52:39 +0000 (23:52 +0000)
commit4fd10eb65e36c9c598bf2376bb6fab18fb6a8142
treeeb203adb20d4f435ef02405ecd73b7842bd53683
parent4b52d5ee5923ac99ac68b29820f2b14a92a6a2b9
Syscall messaging work 2: Continue with the implementation of sendsys(),
using int 0x81.  This entry point will be responsible for sending system
call messages or waiting for messages / port activity.

With this commit system call messages can be run through 0x81 but at the
moment they will always run synchronously. Here's the core interface
code for IA32:

    static __inline int
    sendsys(void *port, void *msg, int msgsize)
    {
int error;
__asm __volatile("int $0x81" : "=a"(error) :
"a"(port), "c"(msg), "d"(msgsize) : "memory");
return(error);
    }

Performance verses a direct system call is currently excellent considering
that this is my initial attempt.

600MHzC3 1.2GHzP3x2(SMP)

getuid() 1300 ns  909 ns
getuid_msg() 1700 ns 1077 ns
20 files changed:
sys/i386/i386/exception.s
sys/i386/i386/machdep.c
sys/i386/i386/trap.c
sys/kern/init_sysent.c
sys/kern/kern_device.c
sys/kern/lwkt_msgport.c
sys/kern/makesyscalls.sh
sys/kern/syscalls.c
sys/platform/pc32/i386/exception.s
sys/platform/pc32/i386/machdep.c
sys/platform/pc32/i386/trap.c
sys/sys/errno.h
sys/sys/globaldata.h
sys/sys/msgport.h
sys/sys/syscall-hide.h
sys/sys/syscall.h
sys/sys/syscall.mk
sys/sys/sysproto.h
sys/sys/sysunion.h
sys/sys/thread.h