mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-23 01:31:05 +00:00
Add a comment about a thread safety issue in Statistic.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106756 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60e6f3d412
commit
27da66db3e
@ -56,6 +56,10 @@ public:
|
||||
}
|
||||
|
||||
const Statistic &operator++() {
|
||||
// FIXME: This function and all those that follow carefully use an
|
||||
// atomic operation to update the value safely in the presence of
|
||||
// concurrent accesses, but not to read the return value, so the
|
||||
// return value is not thread safe.
|
||||
sys::AtomicIncrement(&Value);
|
||||
return init();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user