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]

ecos idle function


Hai,
    in my project i am using the eCos on i386 platform. i am facing some
small problem with the idle thread and i found the solution also can
some body tell me whether that solution is ok or any side effects are
there. i have gone through the mailing list. there are some related
problem posted already in the group. i have gone through and this is
some what different to the problem which is there in the mailing list.

the problem is:
   in my project i am using idle thred count to calculate the CPU load.
so instead of creating one IDL thread in the application i thought of
using eCos IDL thread and CPU load service package provided by the eCos.

  for verfying i created one simple application which will create 20
threads and thread function for each thread is an infinite loop with
sleep of 100 millisec. from other thread i am reading cpuload and
printing. with this setup i am expecting the CPU load as more than 50%
but i always got the 0%.

   So i started printing actually how many times the IDL thread is
entering. i found that for 100 millisec the idl thread is called for
only 10 times.

   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

Thanks Regards
Giri

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