set_hardware_timer() would sometimes (on boot) pass a negative timeout to
arch_timer_set_hardware_timer(). This was harmless, at least with our current x86 timers implementation, since they checked for minimum timeouts. Very small cleanup (now that the file is compiled as C++). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35505 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -147,8 +147,11 @@ timer_interrupt()
|
|||||||
|
|
||||||
// setup the next hardware timer
|
// setup the next hardware timer
|
||||||
if (cpuData.events != NULL) {
|
if (cpuData.events != NULL) {
|
||||||
arch_timer_set_hardware_timer(
|
bigtime_t timeout = (bigtime_t)cpuData.events->schedule_time
|
||||||
(bigtime_t)cpuData.events->schedule_time - system_time());
|
- system_time();
|
||||||
|
if (timeout <= 0)
|
||||||
|
timeout = 1;
|
||||||
|
arch_timer_set_hardware_timer(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
release_spinlock(spinlock);
|
release_spinlock(spinlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user