[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Random question
What exactly does this achieve:
int pthread_wakeup_np (pthread_t thread)
{
#ifdef CONFIG_SMP
if (thread->cpu != rtl_getcpuid()) {
pthread_kill(thread,RTL_SIGNAL_WAKEUP);
rtl_reschedule_thread(thread);
} else
#endif
{
pthread_kill(thread,RTL_SIGNAL_WAKEUP);
rtl_reschedule_thread(thread);
}
return 0;
}
?
It's in rtl_sched.c, and, as I see it, if I'm running on an SMP box,
then your scheduler is doing an uneccessary comparison all the time,
and an unnecessary jump [branch? I can't ever remember which one's
which...] half the time...
Gary (-;