[Top][All Lists]

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

Re: [avr-gcc-list] Readming TCNT1 (__inw_atomic)

From: Derick Schoonbee
Subject: Re: [avr-gcc-list] Readming TCNT1 (__inw_atomic)
Date: Thu, 28 Aug 2003 14:46:05 +0200

Great, thanks. Thinking sounds good ;)

From: Joerg Wunsch <address@hidden>
Reply-To: Joerg Wunsch <address@hidden>
To: address@hidden
Subject: Re: [avr-gcc-list] Readming TCNT1 (__inw_atomic)
Date: Thu, 28 Aug 2003 10:08:42 +0200 (MET DST)

As "Derick Schoonbee" <address@hidden> wrote:

>Is __inw_atomic "valid" ?

No, it has been dropped some time ago.  I think there's been a bit of
discussion about it in the avr-libc developers list, but i'm not sure.

>Or do I just need to follow the guidelines @

If it's in the official FAQ, you can take that for granted. ;-)

Yep, do it as it's written there.  Well, but remember that this
example is meant for situations where it's not clear to the caller
whether global interrupts are currently enabled or not.  If you are
certain they /are/ enabled (e. g. usually inside main()), you can
simplify that by explicitly using cli() and sei() around the code.
The distinction was one of the reasons to drop the *_atomic() macros,
IIRC; it's better if the programmers think about what they actually
need (as you're just doing ;) than blindly relying on something where
the name promises it might be what they want.
J"org Wunsch                                              Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

avr-gcc-list mailing list

Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail

reply via email to

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