Processes can yield the entire process
authorBarret Rhoden <brho@cs.berkeley.edu>
Sun, 18 Sep 2011 02:44:40 +0000 (19:44 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:36:07 +0000 (17:36 -0700)
commitc44f6b1052d3fb74ea06f4202278f47dbb3dedc3
tree8ac506ae47517e1d716ad08a77df35810a92bdf7
parent37eb6659feceb6554d64a72e04e5deaf12caf926
Processes can yield the entire process

When yielding your last vcore, you'll now transition to WAITING, and be
woken up when an event comes in.  If you ever want to wake back up,
you'll need to have at least one ev_q marked FALLBACK/INDIR, and have
that ev_q trigger.

We don't support yielding just to be nice.  If you yield, you need an
event to wake you.  Otherwise, just do your work.

This also changes the ksched to be able to handle a RUNNABLE_M, albeit
not in a perfect manner.
kern/src/process.c
kern/src/resource.c
kern/src/schedule.c