686 |
struct thread *thread = 0; |
struct thread *thread = 0; |
687 |
int i; |
int i; |
688 |
|
|
|
processor->state = PROCESSOR_STATE_RUNNING; |
|
|
|
|
689 |
/* Loop through all scheduling policies and find next thread. */ |
/* Loop through all scheduling policies and find next thread. */ |
690 |
|
|
691 |
for (i = 3; i >= 0; i--) |
for (i = 3; i >= 0; i--) |
770 |
processor_send_dispatch_ipi (processor, thread); |
processor_send_dispatch_ipi (processor, thread); |
771 |
return; |
return; |
772 |
} |
} |
773 |
|
else if (processor->state == PROCESSOR_STATE_RUNNING && |
774 |
|
thread->sched_premul > processor->current_thread->sched_premul) |
775 |
|
{ |
776 |
|
processor->state = PROCESSOR_STATE_DISPATCH; |
777 |
|
processor_send_dispatch_ipi (processor, thread); |
778 |
|
} |
779 |
} |
} |
780 |
|
|
781 |
/* No, we can not execute on last processor. Check if there is any free |
/* No, we can not execute on last processor. Check if there is any free |
791 |
processor_send_dispatch_ipi (processor, thread); |
processor_send_dispatch_ipi (processor, thread); |
792 |
return; |
return; |
793 |
} |
} |
|
#if 0 |
|
794 |
else if (processor->state == PROCESSOR_STATE_RUNNING && |
else if (processor->state == PROCESSOR_STATE_RUNNING && |
795 |
thread->sched_premul > processor->current_thread->sched_premul) |
thread->sched_premul > processor->current_thread->sched_premul) |
796 |
{ |
{ |
797 |
processor->state = PROCESSOR_STATE_DISPATCH; |
processor->state = PROCESSOR_STATE_DISPATCH; |
798 |
processor_send_dispatch_ipi (processor, thread); |
processor_send_dispatch_ipi (processor, thread); |
799 |
} |
} |
|
#endif |
|
800 |
} |
} |
801 |
#endif |
#endif |
802 |
|
|