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>