rendez: Make sure we can block before sleeping
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 19 Jul 2018 21:02:02 +0000 (17:02 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 19 Jul 2018 21:02:02 +0000 (17:02 -0400)
commit8755f50ce5ff3bc644332b7c235da12cf942a24f
tree33d1c438bb7b67ac64bc537c4f10ce71d4d016df
parent5e3c149b4dba4d2ee082d1eee2ac2c4424c2c30e
rendez: Make sure we can block before sleeping

A lot of rendezvouses don't block, but any of them could.  By checking in
advance, instead of deep in sem_down(), we'll catch those cases where we
could have blocked but rarely do.

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