This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: CYGPKG_CPULOAD fixes
- From: John Dallaway <john at dallaway dot org dot uk>
- To: Lars Povlsen <lpovlsen at vitesse dot com>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Mon, 10 May 2010 17:05:48 +0100
- Subject: Re: CYGPKG_CPULOAD fixes
- References: <376637F07F8A9242AD11921B15FA17DC8F22F7@mx-dk.vsc.vitesse.com> <4BCD7EA0.9050903@dallaway.org.uk>
Hi Lars
John Dallaway wrote:
> Lars Povlsen wrote:
>
>> Here's a small fix to the cpuload package (and idle thread).
>>
>> In short, a missing 'volatile' attribute to the loop counter causes
>> newer (arm-eabi GCC 4.2.3/eCosentric toolchain) to produce wrong
>> results.
>>
>> This patch adds a volatile modifier to idle_thread_loops[], and updates
>> the reference to it from the cpuload package. (which was also using a
>> non-array declaration).
>
> This all seems reasonable. Presumably GCC 4 is holding the idle loop
> count in a register. Any other comments before I check this in?
Sanity tested on ARM and checked in. Thank you for the patch.
There are still issues with the cpuload package when built at "-O2"
optimisation. Ref:
http://ecos.sourceware.org/ml/ecos-discuss/2007-06/msg00175.html
John Dallaway
eCos maintainer