Support for blocking and restarting uthreads (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 14 Mar 2011 18:41:56 +0000 (11:41 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:36:00 +0000 (17:36 -0700)
commit60a7a66cd4c579e8dd692a2e64b4aaed2106b978
tree3f701a58d8a3ab5c2960543bad3c5260f1cf5fea
parenta7194135e035a318cd06ecf1230b2102015895dd
Support for blocking and restarting uthreads (XCC)

Test it out with SYS_block.  Uthreads will call out to the 2LS to block
on syscalls.  Pthread code has an example of what to do (though it
doesn't deal with missed messages/overflow yet).

This also introduces a 'state' variable for uthreads, which is mostly
used for debugging in various places.

There's an odd bug floating around still, noticed most recently in
being in vcore_context in thread_yield.  It isn't obvious, relies on
timing, and is very rare.  If you get it regularly, call me.

Rebuild your cross compiler, or at least reinstall your kernel headers.
kern/include/ros/syscall.h
kern/src/kthread.c
kern/src/syscall.c
user/parlib/include/uthread.h
user/parlib/mcs.c
user/parlib/uthread.c
user/pthread/pthread.c