Fixes bug where syscalls were completed twice
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 25 Sep 2012 23:03:02 +0000 (16:03 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 25 Sep 2012 23:03:02 +0000 (16:03 -0700)
commite9052a46781d43973cfe7368c542e7356397d7c9
tree422bad13e113b7a4d9b7ab3bff7878939680779e
parent373c54398eee7a2b2c0ca3c4ab43389f73381951
Fixes bug where syscalls were completed twice

When proc_yield() failed, the syscall would be completed twice.  When
that vcore was preempted and restarted on another core (due to a
change_to, for instance), after the first completion, the vcore would
return up the stack.  When the second completion hits, the kernel would
clobber a small part of the stack (syscalls are usually on the user
stack), which would have disasterous effects (looked like registers were
getting clobbered).
kern/src/syscall.c