Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: base/threading/thread_local_storage.h

Issue 8890003: Cleanup thread_local_storage on Windows (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/threading/thread_local_storage_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_THREADING_THREAD_LOCAL_STORAGE_H_ 5 #ifndef BASE_THREADING_THREAD_LOCAL_STORAGE_H_
6 #define BASE_THREADING_THREAD_LOCAL_STORAGE_H_ 6 #define BASE_THREADING_THREAD_LOCAL_STORAGE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/base_export.h" 9 #include "base/base_export.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 private: 79 private:
80 using StaticSlot::initialized_; 80 using StaticSlot::initialized_;
81 #if defined(OS_WIN) 81 #if defined(OS_WIN)
82 using StaticSlot::slot_; 82 using StaticSlot::slot_;
83 #elif defined(OS_POSIX) 83 #elif defined(OS_POSIX)
84 using StaticSlot::key_; 84 using StaticSlot::key_;
85 #endif 85 #endif
86 DISALLOW_COPY_AND_ASSIGN(Slot); 86 DISALLOW_COPY_AND_ASSIGN(Slot);
87 }; 87 };
88 88
89 #if defined(OS_WIN)
90 // Function called when on thread exit to call TLS
91 // destructor functions. This function is used internally.
92 static void ThreadExit();
93
94 private:
95 // Function to lazily initialize our thread local storage.
96 static void **Initialize();
97
98 static long tls_key_;
99 static long tls_max_;
100 #endif // OS_WIN
101
102 DISALLOW_COPY_AND_ASSIGN(ThreadLocalStorage); 89 DISALLOW_COPY_AND_ASSIGN(ThreadLocalStorage);
103 }; 90 };
104 91
105 } // namespace base 92 } // namespace base
106 93
107 #endif // BASE_THREADING_THREAD_LOCAL_STORAGE_H_ 94 #endif // BASE_THREADING_THREAD_LOCAL_STORAGE_H_
OLDNEW
« no previous file with comments | « no previous file | base/threading/thread_local_storage_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698