Make reads and writes of the guard variable atomic.

The read of the guard variable by the caller is atomic,
and doesn't happen under a mutex.

Our internal reads and writes were non-atomic, because they happened
under a mutex.

The writes should always be atomic since they can be observed outside
of the lock.

Making the reads atomic is not strictly necessary under the current
global mutex approach, but will be under implementations that use a
futex (which I plan to land shortly). However, they should add little
additional cost.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@357944 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed