mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-23 16:01:42 +00:00
Fix idle timeout bug, use correct current time of day.
This commit is contained in:
parent
7affe44ee3
commit
662c0429b9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107102
@ -465,10 +465,10 @@ void
|
|||||||
_thread_kern_idle(void)
|
_thread_kern_idle(void)
|
||||||
{
|
{
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
struct timeval tod, timeout;
|
struct timeval timeout;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
timersub(&_kern_idle_timeout, &tod, &timeout);
|
timersub(&_kern_idle_timeout, &_sched_tod, &timeout);
|
||||||
TIMEVAL_TO_TIMESPEC(&timeout, &ts);
|
TIMEVAL_TO_TIMESPEC(&timeout, &ts);
|
||||||
__sys_nanosleep(&ts, NULL);
|
__sys_nanosleep(&ts, NULL);
|
||||||
}
|
}
|
||||||
|
@ -465,10 +465,10 @@ void
|
|||||||
_thread_kern_idle(void)
|
_thread_kern_idle(void)
|
||||||
{
|
{
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
struct timeval tod, timeout;
|
struct timeval timeout;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
timersub(&_kern_idle_timeout, &tod, &timeout);
|
timersub(&_kern_idle_timeout, &_sched_tod, &timeout);
|
||||||
TIMEVAL_TO_TIMESPEC(&timeout, &ts);
|
TIMEVAL_TO_TIMESPEC(&timeout, &ts);
|
||||||
__sys_nanosleep(&ts, NULL);
|
__sys_nanosleep(&ts, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user