From: Jorrit Herder Date: Fri, 5 Aug 2005 17:02:37 +0000 (+0000) Subject: Second try to fix tick delay problem ... X-Git-Tag: v3.1.0~415 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/rndc.conf.html?a=commitdiff_plain;h=1c570a7d93734d72d937b2bd5080b7b29952d17d;p=minix.git Second try to fix tick delay problem ... --- diff --git a/kernel/main.c b/kernel/main.c index 5eb48cbeb..676fcf06e 100755 --- a/kernel/main.c +++ b/kernel/main.c @@ -238,7 +238,7 @@ timer_t *tp; u16_t magic; /* Now mask all interrupts, including the clock, and stop the clock. */ - outb(INT_CTLMASK, ~0); + outb(INT_CTLMASK, ~1); clock_stop(); if (mon_return && how != RBT_RESET) { diff --git a/kernel/system/do_setalarm.c b/kernel/system/do_setalarm.c index 3e37bbd74..53b2bfe1e 100644 --- a/kernel/system/do_setalarm.c +++ b/kernel/system/do_setalarm.c @@ -44,10 +44,10 @@ message *m_ptr; /* pointer to request message */ /* Return the ticks left on the previous alarm. */ uptime = get_uptime(); - if ((tp->tmr_exp_time == TMR_NEVER) || (tp->tmr_exp_time < uptime) ) { - m_ptr->ALRM_TIME_LEFT = 0; - } else { + if ((tp->tmr_exp_time != TMR_NEVER) && (uptime < tp->tmr_exp_time) ) { m_ptr->ALRM_TIME_LEFT = (tp->tmr_exp_time - uptime); + } else { + m_ptr->ALRM_TIME_LEFT = 0; } /* Finally, (re)set the timer depending on the expiration time. */ @@ -72,7 +72,6 @@ timer_t *tp; * process with a notification message from CLOCK. */ int proc_nr = tmr_arg(tp)->ta_int; /* get process number */ - tmr_inittimer(tp); /* reset alarm timer */ lock_notify(CLOCK, proc_nr); /* notify process */ }