I don't think so either. I'd be surprised if gcc inserts any memory
barriers.
But I do remember reading somewhere that a C optimizer probably won't
reorder memory operations around a function with external linkage.. perhaps
thats what you're thinking of.
Ross.
----- Original Message -----
From: "Bjorn Roche" <bjorn@...>
To: <liblf-dev@yahoogroups.com>
Sent: Saturday, November 01, 2008 1:34 AM
Subject: Re: [liblf-dev] Lock-free ring buffer memory barriers test case
>
> On Oct 30, 2008, at 5:10 PM, James McCartney wrote:
>
>> On Wed, Oct 29, 2008 at 11:37 AM, Bjorn Roche <bjorn@...>
>> wrote:
>> > Plus, gcc, for example, tends to
>> > insert memory barriers in places, like at function calls.
>>
>> I really don't think so. citation?
>>
>
>
> I can't find a citation right now, so I could be wrong. If I am wrong,
> sorry about that. It's obviously not behavior to count on anway, since
> even if you know you are always working with gcc functions can be
> inlined.
>
> bjorn
>
> -----------------------------
> Bjorn Roche
> XO Wave
> Digital Audio Production and Post-Production Software
> http://www.xowave.com
> http://blog.bjornroche.com
> http://myspace.com/xowave
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>