On Monday 23 July 2007 18:05:58 Satyam Sharma wrote:
The first goal is correct code.
The reason for the memory barrier is to prevent other memory references
from being moved over the atomic reference.
e.g. when a bit is used to communicate with another CPU this might be dangerous.
I don't think it's a good idea to remove them. It'll likely introduce subtle
bugs. Atomic bitops tend to be so slow anyways that it doesn't make much