Chromium Code Reviews| Index: base/threading/thread_local_storage.h |
| =================================================================== |
| --- base/threading/thread_local_storage.h (revision 111452) |
| +++ base/threading/thread_local_storage.h (working copy) |
| @@ -6,6 +6,7 @@ |
| #define BASE_THREADING_THREAD_LOCAL_STORAGE_H_ |
| #pragma once |
| +#include "base/atomicops.h" |
| #include "base/base_export.h" |
| #include "base/basictypes.h" |
| @@ -79,13 +80,15 @@ |
| private: |
| // The maximum number of 'slots' in our thread local storage stack. |
| - // For now, this is fixed. We could either increase statically, or |
| - // we could make it dynamic in the future. |
| static const int kThreadLocalStorageSize = 64; |
| + // The maximum number of times to try to clear slots by caling destructors. |
|
willchan no longer on Chromium
2011/11/29 01:46:49
s/caling/calling/
jar (doing other things)
2011/11/29 02:32:45
Done.
|
| + // Use pthread naming convention for clarity. |
| + static const int PTHREAD_DESTRUCTOR_ITERATIONS = kThreadLocalStorageSize; |
|
rvargas (doing something else)
2011/11/29 01:26:31
I don't see why we want to expose this value in th
jar (doing other things)
2011/11/29 02:32:45
Done.
|
| + |
| static long tls_key_; |
| static long tls_max_; |
| - static TLSDestructorFunc tls_destructors_[kThreadLocalStorageSize]; |
| + static subtle::AtomicWord tls_destructors_[kThreadLocalStorageSize]; |
| #endif // OS_WIN |
| DISALLOW_COPY_AND_ASSIGN(ThreadLocalStorage); |