// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_THREADING_THREAD_LOCAL_STORAGE_H_ #define BASE_THREADING_THREAD_LOCAL_STORAGE_H_ #include <stdint.h> #include "base/base_export.h" #include "build/build_config.h" #if BUILDFLAG(IS_WIN) #include "base/win/windows_types.h" #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) #include <pthread.h> #endif namespace base { class SamplingHeapProfiler; namespace debug { class GlobalActivityTracker; } // namespace debug namespace trace_event { class MallocDumpProvider; } // namespace trace_event namespace internal { class ThreadLocalStorageTestInternal; // WARNING: You should *NOT* use this class directly. // PlatformThreadLocalStorage is a low-level abstraction of the OS's TLS // interface. Instead, you should use one of the following: // * ThreadLocalOwnedPointer (from thread_local.h) for unique_ptrs. // * ThreadLocalStorage::StaticSlot/Slot for more direct control of the slot. class BASE_EXPORT PlatformThreadLocalStorage { … }; } // namespace internal // Wrapper for thread local storage. This class doesn't do much except provide // an API for portability. class BASE_EXPORT ThreadLocalStorage { … }; } // namespace base #endif // BASE_THREADING_THREAD_LOCAL_STORAGE_H_