When any of the executed timer hooks return B_INVOKE_SCHEDULER, let
timer_interrupt() return B_INVOKE_SCHEDULER. The scheduler itself uses a timer hook and relies on scheduler_reschedule() to be called. Will make this even more reliable in the next commit. This might fix #3535. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34614 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -77,6 +77,7 @@ timer_interrupt()
|
||||
spinlock *spinlock;
|
||||
per_cpu_timer_data& cpuData = sPerCPU[smp_get_current_cpu()];
|
||||
int32 rc = B_HANDLED_INTERRUPT;
|
||||
bool invokeScheduler = false;
|
||||
|
||||
TRACE(("timer_interrupt: time %lld, cpu %ld\n", system_time(),
|
||||
smp_get_current_cpu()));
|
||||
@@ -121,6 +122,9 @@ timer_interrupt()
|
||||
|
||||
if ((mode & B_TIMER_ACQUIRE_THREAD_LOCK) != 0)
|
||||
RELEASE_THREAD_LOCK();
|
||||
|
||||
if (rc == B_INVOKE_SCHEDULER)
|
||||
invokeScheduler = true;
|
||||
}
|
||||
|
||||
cpuData.current_event_in_progress = 0;
|
||||
@@ -153,7 +157,7 @@ timer_interrupt()
|
||||
|
||||
release_spinlock(spinlock);
|
||||
|
||||
return rc;
|
||||
return invokeScheduler ? B_INVOKE_SCHEDULER : rc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user