This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Round robin scheduler question
> HAL_LSBIT_INDEX(index, queue_map);
>
> Cyg_RunQueue *queue = &run_queue[index];
>
> CYG_ASSERT( !queue->empty(), "Queue for index empty");
>
> Cyg_Thread *thread = queue->get_head();
>
> + if ( thread != current) {
> + cyg_priority pri = current->priority;
> + Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler;
> + Cyg_RunQueue *current_queue = &sched->run_queue[pri];
> + current_queue->rotate();
> + }
>
> #endif
if timeslice was over earlier then timeslice_cpu would have already got called
before this schedule call. in that case rotate will be done twice, and outcomes
could be many -- breaking of round-robin nature at that level, some thread not
getting chance to execute ever even being in runqueue all the times.
please correct me, if I got it wrong.
------
sandeep
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.511 / Virus Database: 308 - Release Date: 8/19/2003
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss