Fix monotonic scheduler change, to not refresh 'now' before exit. Otherwise

we can return negative timeout after spending time handling other events.
This commit is contained in:
tteras 2009-01-23 09:10:13 +00:00
parent 7bc9f9e4ee
commit 731a29e03b

View File

@ -1,4 +1,4 @@
/* $NetBSD: schedule.c,v 1.6 2009/01/23 08:25:07 tteras Exp $ */
/* $NetBSD: schedule.c,v 1.7 2009/01/23 09:10:13 tteras Exp $ */
/* $KAME: schedule.c,v 1.19 2001/11/05 10:53:19 sakane Exp $ */
@ -122,7 +122,6 @@ schedular()
if (p == NULL)
return NULL;
sched_get_monotonic_time(&now);
timersub(&p->xtime, &now, &timeout);
return &timeout;