Fix issues with unset_alarm() [1/2]
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 15 Jul 2016 19:30:55 +0000 (15:30 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 19 Jul 2016 15:43:10 +0000 (11:43 -0400)
commit3dd87aef5d43ce09b78807cd548ee11be97d86ee
tree3206f01c4f98a165c236947c13d24fc22be01abe
parent865e03f621b01b01c413e8efc24c6a22d7a06a5e
Fix issues with unset_alarm() [1/2]

Previously, unset_alarm() would return before an RKM alarm would fire.  It
was up to users (e.g. devalarm) to deal with it.  That's a real pain.

Now, unset_alarm() will block until we're sure the alarm is done.  This
gets tricky for alarms that rearm themselves.

As a side-effect of this, unset_alarm() now has a waits-on dependency on
the handler for RKM alarms.  (All of this is much simpler with IRQ alarms).

In the process, I cleaned up the reset_* family, which were just unset/set
helpers.

Odds are, there are more problems with this that will pop up later.

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