Boost logo

Boost :

From: Scott McCaskill (scott_at_[hidden])
Date: 2001-08-13 17:24:02


> to be portable you have to serialize *all* your
> writes/updates which should also preclude *any*
> concurrent reads (unless you have read access only).
> you should do it using portable synch. functions
> such as mutex.lock, join, semaphore.wait, rwlocks,
> etc.. *not* using any volatiles - it simply does
> not help at all and could just hurt performance,
> instead.
>

I know, I wasn't using volatile for that. I thought that volatile had to do
with forcing the value to be written to memory rather than stored in the
processor's cache. But then, I suppose there are all sorts of things that
wouldn't work if it was possible for one processor to do a read and get a
stale value from main memory.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk