avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] Missed Optimisation ?


From: jan
Subject: Re: [avr-chat] Missed Optimisation ?
Date: Tue, 1 Mar 2011 15:11:14 +0100

On Wed, 2 Mar 2011 01:04:44 +1100
Erik Christiansen <address@hidden> wrote:

> IANA "volatile" expert, but understand that "[hardware|other thread]
> may change the value while this code is executing" is a legitimate
> view of the compiler's perspective. In that case, the whole value
> must be read and rewritten, to avoid composite values, partly
> software created, and partly hardware-(or alternate thread)-written.
> reading and writing only some bytes is not a reliable option with a
> predictable outcome.

OK, neither am I a. But if the whole value must be read and rewritten
the compiler better insert interrupt disable/enable for volatiles
larger than 8 bits.

/Janne





reply via email to

[Prev in Thread] Current Thread [Next in Thread]