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]

Re: ecos idle function


>    while debugging why the idle thread is entering only 10 time in 100
> milli sec. i commented HAL_IDLE_THREAD_ACTION in the idle_thread_main.
> then i found the idle thread is called around 55000 times.
> 
>    So i am thincking of commenting HAL_IDLE_THREAD_ACTION in the
> idle_thread_main. i wanted to know any body has done this. if i do this
> any side effects will be there

Its generally a good idea to find out what it happening. In this case

HAL_IDLE_THREAD_ACTION calls the function hal_idle_thread_action() in
pcmb_misc.c

void hal_idle_thread_action(cyg_uint32 loop_count)
{
#if 1 //ndef CYGPKG_HAL_SMP_SUPPORT
    asm("hlt") ;
 
#else    

So the processor is being halted when there is nothing to do. 

The side affects will be your power consumption goes up, your battery
life goes down, the system runs hotter and the fan wears out earlier.
Plus the CPU load code starts to work correctly. Note there is a
disclaimer in the documentation that says if the target does any power
saving, the CPU load information will be wrong....
 
        Andrew


-- 
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]