Fixes issues with proc_yield and preempt_pending
authorBarret Rhoden <brho@cs.berkeley.edu>
Sat, 7 Apr 2012 01:18:38 +0000 (18:18 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sat, 7 Apr 2012 01:26:18 +0000 (18:26 -0700)
commitb16525a5aa2bae8111ba56769906b873ff978b44
tree2e000b2fa8b6387a36527c9824ca1b7079137342
parent51e297490e7a7bd9a350d54da4ade20ce964aeba
Fixes issues with proc_yield and preempt_pending

preempt_pending has been neglected a little with some of the recent
kernel/user core management code.

This fix stops the kernel from aborting a yield when a process has a
preempt pending *and* some race happened in userspace where amt_wanted
wasn't decreased.

This also decreases the chance of that race by keeping userspace from
decrementing its amt_wanted when it is being nice (preempt pending).
kern/src/process.c
user/parlib/vcore.c