1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-07 13:14:51 +00:00

Fix idle timeout bug, use correct current time of day.

This commit is contained in:
David Xu 2002-11-20 12:35:59 +00:00
parent 7affe44ee3
commit 662c0429b9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107102
2 changed files with 4 additions and 4 deletions

View File

@ -465,10 +465,10 @@ void
_thread_kern_idle(void)
{
struct timespec ts;
struct timeval tod, timeout;
struct timeval timeout;
for (;;) {
timersub(&_kern_idle_timeout, &tod, &timeout);
timersub(&_kern_idle_timeout, &_sched_tod, &timeout);
TIMEVAL_TO_TIMESPEC(&timeout, &ts);
__sys_nanosleep(&ts, NULL);
}

View File

@ -465,10 +465,10 @@ void
_thread_kern_idle(void)
{
struct timespec ts;
struct timeval tod, timeout;
struct timeval timeout;
for (;;) {
timersub(&_kern_idle_timeout, &tod, &timeout);
timersub(&_kern_idle_timeout, &_sched_tod, &timeout);
TIMEVAL_TO_TIMESPEC(&timeout, &ts);
__sys_nanosleep(&ts, NULL);
}