In our previous episode, Jonas Maebe said:
> > I used the interlocked increment/decrement, which- as I understand  
> > it- should handle membar itself on architectures that can benefit  
> > from it.
> 
> They do not include any memory barrier. The only thing those routines  
> guarantee on all platforms, is that the value is atomically  
> incremented/decremented.

(btw that depends on which functions you mean, our own assembler versions
probably.

The Windows
functions of the same name are guaranteed to have memory barriers afaik,
but do require alignment. (probably to avoid crosssing cache lines)
)

http://msdn.microsoft.com/en-us/library/windows/desktop/ms683614%28v=vs.85%29.aspx
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to