projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
60e6f3d
)
Add a comment about a thread safety issue in Statistic.h.
author
Dan Gohman
<gohman@apple.com>
Thu, 24 Jun 2010 16:31:32 +0000
(16:31 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 24 Jun 2010 16:31:32 +0000
(16:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106756
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/Statistic.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/Statistic.h
b/include/llvm/ADT/Statistic.h
index c593c58c127430ef5bf18cbf28e3d87d7e59913d..3a1319f1090ce0c4d42b52b1ec2f62775de3e563 100644
(file)
--- a/
include/llvm/ADT/Statistic.h
+++ b/
include/llvm/ADT/Statistic.h
@@
-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();
}