Index: base/threading/thread_local_storage.h |
diff --git a/base/threading/thread_local_storage.h b/base/threading/thread_local_storage.h |
index 50f88685a57ba43c1b8c3d6ecd41c4b98cc2449e..195bff683c3bb8b7a3a23aec30f87ccfb25e7cbe 100644 |
--- a/base/threading/thread_local_storage.h |
+++ b/base/threading/thread_local_storage.h |
@@ -5,6 +5,7 @@ |
#ifndef BASE_THREADING_THREAD_LOCAL_STORAGE_H_ |
#define BASE_THREADING_THREAD_LOCAL_STORAGE_H_ |
+#include "base/atomicops.h" |
#include "base/base_export.h" |
#include "base/basictypes.h" |
@@ -114,10 +115,12 @@ class BASE_EXPORT ThreadLocalStorage { |
// value 'value'. |
void Set(void* value); |
- bool initialized() const { return initialized_; } |
+ bool initialized() const { |
+ return base::subtle::Acquire_Load(&initialized_) != 0; |
+ } |
// The internals of this struct should be considered private. |
- bool initialized_; |
+ base::subtle::Atomic32 initialized_; |
int slot_; |
}; |