[En-Nut-Discussion] Not fixed!!!: Re: confirmed!!! Re: NutOS 4.4.0 on ARM7: possibly bug in NutEnterCritical / NutExitCritical
Alain M.
alainm at pobox.com
Fri Feb 22 15:56:01 CET 2008
Ole Reinhardt escreveu:
>
> So I would suggest to leave NutEnterCritical / NutExitCritical and
> declacre them as deprecated.
>
> Two new Functions
>
> NutEnterCriticalWithFlags(&flags)
> NutExitCriticalWithFlags(flags)
Is this a typo that the second line does not have "(&flags)"??
May I suggest that more than one option be available? Due to ARM's
pipeline structure, a local memory takes too many cicles to write/read,
so there could be:
1) a stack version, could be the old one and to be used with care,
2) a register version. Question: how to make sure it goes to a resister?
This would be the fastest version, good for ISR.
3) a memory variable version, 100% safe, and leave it to the compiler to
optimize to register if possible at all. It could even allocate it's own
temorary variable.
(1) and (2) would come with big warnings, leaving only (3) for most
novice programers...
Alain
More information about the En-Nut-Discussion
mailing list