|
From: <gs...@no...> - 2004-04-29 21:40:08
|
Due to an oversight in the timer performance patch I submitted in
October, the timer code in st-1.5.0 does not compile when USE_POLL
is defined. The enclosed patch will fix it.
--
Andreas Gustafsson, gs...@no...
--- st-1.5.0/sched.c.orig 2004-01-11 14:21:55.000000000 -0800
+++ st-1.5.0/sched.c 2004-04-22 18:25:49.000000000 -0700
@@ -477,10 +477,13 @@
}
ST_ASSERT(pollfds <= _ST_POLLFDS + _ST_POLLFDS_SIZE);
- if (ST_CLIST_IS_EMPTY(&_ST_SLEEPQ)) {
+ if (_ST_SLEEPQ == NULL) {
timeout = -1;
} else {
- min_timeout = (_ST_THREAD_PTR(_ST_SLEEPQ.next))->sleep;
+ if (_ST_SLEEPQ->due <= _st_this_vp.last_clock)
+ min_timeout = 0;
+ else
+ min_timeout = _ST_SLEEPQ->due - _st_this_vp.last_clock;
timeout = (int) (min_timeout / 1000);
}
|