Mark kthreads as ktasks for kernel I/O [2/2]
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 7 Dec 2015 22:23:32 +0000 (17:23 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 10 Dec 2015 16:23:29 +0000 (11:23 -0500)
commit32a763d1b1cae7a34697a20272f208d46839418d
tree84eaa578e12b533966fc4b2ed61164aa961c2ad6
parent5faf5df3a98fa49b2982bb98fe48d78154f7e3cd
Mark kthreads as ktasks for kernel I/O [2/2]

We had been just doing a switch_to(0).  That's pretty nasty.  Previously,
it'd just blow up if we blocked in KFS (which is how I've been running into
these problems).  That was because we'd switch_to 0, have no current,
block, restart, then not reset current (or decref), as in the switch_to
ktask case.

Now, we aren't using current to tell if we should save the addr space or
not, but we still shouldn't be switch_to(0).

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/kthread.h
kern/src/elf.c
kern/src/kthread.c
kern/src/vfs.c