This is the mail archive of the ecos-discuss@sourceware.org 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: idle thread not required


On Friday, February 5, 2010, Paul D. DeRocco <pderocco@ix.netcom.com> wrote:
>> Le 4 févr. 10 à 05:16, ganesh kr a écrit :
>>
>> > I have my own idle thread defined in my application with lowest thread
>> > priority. Please let me know how can I desable the default idle thread
>> > present in eCos package? Is there any default idle thread at all? Also
>> > If assign my application idle thread with priority 0, it does not run.
>> > Any idea why is like that.
>
>> From: Behalf Of Peter Niebert
>>
>> The idle thread in eCOS as in most systems puts the processor in a low
>> energy mode / sleep mode, only to wake up at the next
>> interrupt.
>>
>> In theory, you could achieve the same effect in ?a scheduler without
>> an idle thread, but that would imply that the scheduler would
>> have to distinguish between no thread ready (idle) and some thread
>> ready. The idle thread, always ready, is a smart convenience
>> allowing to simplify the code of schedulers.
>>
>> You do not want to get rid of it :-)
>
> Furthermore, it is "disabled" merely by always having a higher priority
> runnable thread.
>
> Also, priority 0 is the highest priority, not the lowest. If you have one
> always runnable thread at priority 0, then it should be running all the
> time. If you don't think it's running at all, is it possible that you are
> relying upon some other thread to pass information out to you, like an
> Ethernet thread?

One good way to see where the time is being spent is to try profiling.
http://ecos.sourceware.org/docs-latest/ref/gprof.html

Regards,
Edgar

> --
>
> Ciao, ? ? ? ? ? ? ? Paul D. DeRocco
> Paul ? ? ? ? ? ? ? ?mailto:pderocco@ix.netcom.com
>
>
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
>

-- 
Edgar Grimberg
System Developer
Zylin AS

Visit us at Embedded World, March 2nd-4th. IS2T's stand, HALL 10 - 118
http://www.zylin.com/events_embeddedworld.html

ZY1000 JTAG Debugger http://www.zylin.com/zy1000.html
Phone: (+47) 51 63 25 00

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