avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Inline assembler and compiler optimization


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] Inline assembler and compiler optimization
Date: Tue, 17 Mar 2009 17:01:32 +0100
User-agent: Mutt/1.5.11

As Weddington, Eric wrote:

> > Anyway, it might make sense to provide an additional macro like
> > __memory_barrier() that expands to __asm__
> > __volatile__(""::"memory").

> If we do that, we might as well make it a public symbol, yes?:
> #define memory_barrier()  __asm__ __volatile__(""::"memory")

If we document it, it /is/ public. ;-)

The point is that user programs might already use the identifier
memory_barrier so we'd better avoid redefining it (at least, as long
as it goes into one of the existing header files).

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

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