kth: Break up sem_down()
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 7 Nov 2018 15:57:39 +0000 (10:57 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 14 Dec 2018 22:23:48 +0000 (17:23 -0500)
commit06ef9696f415935c5ff8a5ee0a4583a50a83976a
treeeeaa70c6e833ab36b46b3ca8318b6ae5e41eab70
parent4c005135add747c83aa18623e3b24986956d0d9a
kth: Break up sem_down()

sem_down() is a bit of a beast.  The main purpose here is to split out
the guts of blocking a kthread from the semaphore itself so that we can
make CVs not rely on semaphores.

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