This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

issues/suggestions related to scheduler start function


hi folks,

looking at the code of scheduler start, I have some issues/suggestions
regarding scheduler start function.

* won't it be making some difference to code size and speed up a little (though
by miniscule amount, but considering embedded devices, every byte saved is
useful) 

void Cyg_Scheduler::start()
{
    CYG_REPORT_FUNCTION();

#ifdef CYGPKG_KERNEL_SMP_SUPPORT
    HAL_SMP_CPU_TYPE cpu;
++  HAL_SMP_CPU_TYPE curcpu = CYG_KERNEL_CPU_THIS();

    for( cpu = 0; cpu < CYG_KERNEL_CPU_COUNT(); cpu++ )
    {
        // Don't start this CPU, it is running already!
--      if( cpu == CYG_KERNEL_CPU_THIS() )
++      if( cpu == curcpu )
            continue;

        CYG_KERNEL_CPU_START( cpu );
    }
#endif

    start_cpu();
}

* if someone enables SMP configuration but for single processor, then it will
CYG_KERNEL_CPU_START(cpu) already running CPU. will that create any problems?

* if you have say, 3 processors (0,1,2), and you are allowed to use any
processor as startup processors. You configure for 2 processors, but use
processor no. 2 (3rd processor) as the startup processor, existing code will
endup firing 3 processors for a 2 processor configuration and some of the data
structures will be well messedup.

could these smart acts (if possible to be done by users) be taken care of by
some logic implplemented in this function?

cheers
brij
 


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]