Re: Compiler ordering barriers in C++0x
  Home FAQ Contact Sign in
comp.lang.c++.moderated only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Compiler ordering barriers in C++0x         

Group: comp.lang.c++.moderated · Group Profile
Author: nickf3
Date: Apr 28, 2008 00:00

On Apr 24, 3:04 am, Dmitriy Vyukov gmail.com> wrote:
> Will it be possible to issue only compiler ordering barrier (release,
> acquire or full), but not hardware ordering barrier in C++0x?
>
> Accesses to volatile variables are ordered only with respect to
> accesses to other volatile variables. What I want it to order access
> to variable with respect to accesses to all other volatile and non-
> volatile variables (w/o any hardware barriers, only compiler
> ordering).
>
> Now it can be accomplished with "__asm__ __volatile__
> ("" : : :"memory")" on gcc, and with _ReadWriteBarrier() on msvc. I am
> interested whether it will be possible to do this in C++0x language w/
> o compiler dependency.
>
> Such compiler barriers are useful in effective synchronization
> algorithms like SMR+RCU:http://sourceforge.net/project/showfiles.php?group_id=127837
> (fastsmr package)
> because they allows one to eliminate all hardware memory barriers from
> fast-path.
>
> Dmitriy V'jukov
>

Is this really possible without explicit hardware support
on archs like sparc with partial store-ordering?
Just wondering.
--
Nikolai

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
no comments
diggit! del.icio.us! reddit!