Paul Eggert wrote: > Linus Torvalds has deprecated the use of 'volatile' in data > structures for optimization barriers (which is the use that started > this thread), and prefers the use of primitives like barrier() > instead.
Sure, I agree that it's easier to write wrong code with 'volatile' than when using 'barrier()'. However, I don't know how to write barrier() portably, i.e. in a way that would work with compilers other than gcc and icc. Therefore I'm using 'volatile' as the next best solution. Bruno