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. llvm-svn: 357944
Loading
Please register or sign in to comment