kth: Implement CVs without semaphores
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 7 Nov 2018 16:02:59 +0000 (11:02 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 14 Dec 2018 22:23:48 +0000 (17:23 -0500)
commit150e3785156e67eb6f4ce8264076334436f07860
tree67961359cebbc8da1ac42be283e006aac73cfc34
parent06ef9696f415935c5ff8a5ee0a4583a50a83976a
kth: Implement CVs without semaphores

Implementing CVs with semaphores was possible, at least when you peer
inside the sem, but it was a minor pain and conflicted with some
upcoming features.

Notably, sem_down() *may* sleep.  cv_wait() *will* sleep.  This makes
the CV code a lot cleaner.

It does break db sem, in the sense that CVs aren't semaphores yet.  I'll
clean that up shortly.

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