| 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.
|
| + // Use pthread naming convention for clarity.
|
| + static const int PTHREAD_DESTRUCTOR_ITERATIONS = kThreadLocalStorageSize;
|
| +
|
| 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);
|
|
|