syslets: add both 32bit and 64bit x86 syslet support
authorZach Brown <zach.brown@oracle.com>
Thu, 6 Dec 2007 23:20:19 +0000 (15:20 -0800)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 22 Jan 2008 09:35:01 +0000 (10:35 +0100)
commit72e31694340a9338a253fdd944011bd4413434ee
tree39013984fcaf08e4d824c3f8466bd628dd89c4de
parentc57e2d7c3bc753c48f5a8eb0109fb92840ec5f59
syslets: add both 32bit and 64bit x86 syslet support

This adds the architecture-specific routines needed by syslets for x86.

The syslet thread creation routines create a new thread which executes
a kernel function and then returns to userspace instead of exiting.

move_user_context() and set_user_frame() let the scheduler modify a child
thread so that it returns to userspace at the same place that a blocking
system call would have when it finished.  This currently performs a very
expensive copy of the fpu state.  Intel is working on a more robust patch
which allocates the i387 state off of thread_struct.  When that is ready
this can just juggle pointers to transfer the fpu state.

The syslets infrastructure needs to work with ptregs for the task which
is in sys_indirect().  So we add a PTREGSCALL stub around sys_indirect()
in x86_64.

Finally, we wire up sys_syslet_ring_wait().

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Jens Axboe <axboe@axboetest.dk.oracle.com>
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_64.S
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/kernel/syscall_table_32.S
include/asm-x86/syslet-abi.h
include/asm-x86/syslet.h
include/asm-x86/unistd_32.h
include/asm-x86/unistd_64.h