Add period and count to #alarm
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 13 Apr 2016 20:23:16 +0000 (16:23 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 15 Apr 2016 14:29:13 +0000 (10:29 -0400)
commit28c56d20bbc4ec70cc7d103b6e950cbf4e9914d6
tree822cff7ae9ec2a769dbb227007dd8ee784029b59
parent839a2b6811ab4d83b6c13c2014aadb8d07cbb78c
Add period and count to #alarm

This adds two features:
- period: the alarm will repeat with interval 'period'
- count: track the amount of times the alarm fired.  You can read with
  EAGAIN and select/epoll this.

I also added some protection to various races on the proc_alarm's state.

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