summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/Error.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-04-08 21:26:25 +0000
committerEric Fiselier <eric@efcs.ca>2019-04-08 21:26:25 +0000
commit62c2b5ac680d36d383bf44f392bb5f1c5864adb0 (patch)
tree5f51e7472400da68fd1677e173a746fc425be815 /llvm/tools/llvm-readobj/Error.cpp
parent773e04c88366b86a4285f296ab6d632597f07db8 (diff)
downloadbcm5719-llvm-62c2b5ac680d36d383bf44f392bb5f1c5864adb0.tar.gz
bcm5719-llvm-62c2b5ac680d36d383bf44f392bb5f1c5864adb0.zip
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
Diffstat (limited to 'llvm/tools/llvm-readobj/Error.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud