[ECOS] task switch hook
David Brennan
david@brennanhome.com
Sat Sep 18 19:01:00 GMT 2004
Actually we are trying to calculate idle time. I know eCos has a
mechanism for doing that but here is the way our setup functions.
We run about 10 task most of which are time based (every 10ms to every
250ms). Our "idle" thread runs once they are all blocked and does
various non-time critical functions. (It does a health check of various
hardware, computes the CRC of the .text and .rodata spaces, walks
through the heap checking for corruption, etc.) Since it runs
"constantly" there is no way to let the eCos idle task run. (And the
processor utilization of our idle thread should not be counted). So I
would like to use a high speed timer to check the percentage of time the
my idle task is running. The method I am trying to use is the same one
we used for VxWorks. But I would be open to suggestions if you have any.
Thanks
David
Andrew Lunn wrote:
>On Thu, Sep 16, 2004 at 08:35:59PM -0700, David Brennan wrote:
>
>
>>Within our application we have a desire to run a small piece of code on
>>every task switch. Is there any mechanism built in to eCos to allow a
>>user written routine to run on task switch? The application we are
>>porting is from VxWorks and they provided one. I know we have access to
>>the eCos source, and could potentially put it in the kernel itself. But
>>we would like to try and use a built in feature if it exists.
>>
>>
>
>I don't remember seeing such a huck in the documentation or the code
>itself, but its admitedly not me area of expertise. I think you will
>need to modify the code.
>
>What are you trying to do? Some sort of process accounting or tracking
>threads for debugging purposes. eCos does have a tracing mechanism.
>
> 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
More information about the Ecos-discuss
mailing list