diff options
| author | Dan Gohman <gohman@apple.com> | 2010-06-24 16:31:32 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-06-24 16:31:32 +0000 |
| commit | 3f9ceb7916bc5c079f133f5522e14b2c41adf2c7 (patch) | |
| tree | d57e58c10ef91de186f70ba428954aef373ac11f /llvm | |
| parent | 87f475a3297743cfab6fb6a3bbacd1a08e256df1 (diff) | |
| download | bcm5719-llvm-3f9ceb7916bc5c079f133f5522e14b2c41adf2c7.tar.gz bcm5719-llvm-3f9ceb7916bc5c079f133f5522e14b2c41adf2c7.zip | |
Add a comment about a thread safety issue in Statistic.h.
llvm-svn: 106756
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/ADT/Statistic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/Statistic.h b/llvm/include/llvm/ADT/Statistic.h index c593c58c127..3a1319f1090 100644 --- a/llvm/include/llvm/ADT/Statistic.h +++ b/llvm/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(); } |

