Fixed small bug in alarm code.

Kernel timer count was not reset after expiry.
This commit is contained in:
Jorrit Herder
2005-08-05 16:46:27 +00:00
parent 7de7ca978d
commit e396496d8c
4 changed files with 6 additions and 16 deletions

View File

@@ -1,4 +1,5 @@
#include "sysutil.h"
#include <timers.h>
/*===========================================================================*
* tickdelay *
@@ -27,7 +28,7 @@ long ticks; /* number of ticks to wait */
receive(CLOCK,&m_alarm); /* await synchronous alarm */
/* Check if we must reschedule the current alarm. */
if (m.ALRM_TIME_LEFT > 0) {
if (m.ALRM_TIME_LEFT > 0 && m.ALRM_TIME_LEFT != TMR_NEVER) {
m.ALRM_EXP_TIME = m.ALRM_TIME_LEFT - ticks;
if (m.ALRM_EXP_TIME <= 0)
m.ALRM_EXP_TIME = 1;