On Tue, Oct 30, 2007 at 09:20:28 +0100, Eric Botcazou wrote:
> No, I just wanted to point out that "volatile" has a well-defined semantics 
> and can be properly used for shared accesses.  In other words, it's not all
> or nothing like your earlier message[*] seemed to imply.
> 
> [*] http://gcc.gnu.org/ml/gcc/2007-10/msg00663.html

I didn't get your point.  Sure volatile can be used _along_ with
shared data.  But we can't say it _has_ to be used _for_ shared data.
I.e. if you require all shared data to be volatile, you can't pass
pointer to such data to any function without casting away the
qualifier.

volatile can be properly used _only_ if you also assume atomicity and
cache-coherence, and this is beyond POSIX.  But anyway, I'm proving
the opposite: when you use POSIX locks, you don't have to use
volatile, that it.


-- 
   Tomash Brechko

Reply via email to