summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2002-11-20 12:35:59 +0000
committerdavidxu <davidxu@FreeBSD.org>2002-11-20 12:35:59 +0000
commitcf1800bd88958ac38be4fab6259b019fe1d8793c (patch)
treeee7d83041a648591352b2198626687e5f05ff3b1 /lib/libpthread/thread
parente398b8022d3ef30f67d11b583ac20ff19176d23e (diff)
downloadFreeBSD-src-cf1800bd88958ac38be4fab6259b019fe1d8793c.zip
FreeBSD-src-cf1800bd88958ac38be4fab6259b019fe1d8793c.tar.gz
Fix idle timeout bug, use correct current time of day.
Diffstat (limited to 'lib/libpthread/thread')
-rw-r--r--lib/libpthread/thread/thr_kern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c
index b738a75..892b647 100644
--- a/lib/libpthread/thread/thr_kern.c
+++ b/lib/libpthread/thread/thr_kern.c
@@ -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);
}
OpenPOWER on IntegriCloud