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

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

Issue 8550009: Provide DllMain, and hook to support TLS callbacks. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 DISALLOW_COPY_AND_ASSIGN(Slot); 68 DISALLOW_COPY_AND_ASSIGN(Slot);
69 }; 69 };
70 70
71 #if defined(OS_WIN) 71 #if defined(OS_WIN)
72 // Function called when on thread exit to call TLS 72 // Function called when on thread exit to call TLS
73 // destructor functions. This function is used internally. 73 // destructor functions. This function is used internally.
74 static void ThreadExit(); 74 static void ThreadExit();
75 75
76 private: 76 private:
77 // Function to lazily initialize our thread local storage. 77 // Function to lazily initialize our thread local storage.
78 static void **Initialize(); 78 static void **Initialize();
rvargas (doing something else) 2011/11/30 04:01:49 We could also move this to the cc file.
jar (doing other things) 2011/11/30 07:31:30 Done. (and renamed to be readable)
79 79
80 static long tls_key_;
81 static long tls_max_;
82 #endif // OS_WIN 80 #endif // OS_WIN
83 81
84 DISALLOW_COPY_AND_ASSIGN(ThreadLocalStorage); 82 DISALLOW_COPY_AND_ASSIGN(ThreadLocalStorage);
85 }; 83 };
86 84
87 } // namespace base 85 } // namespace base
88 86
89 #endif // BASE_THREADING_THREAD_LOCAL_STORAGE_H_ 87 #endif // BASE_THREADING_THREAD_LOCAL_STORAGE_H_
OLDNEW
« no previous file with comments | « no previous file | base/threading/thread_local_storage_win.cc » ('j') | base/threading/thread_local_storage_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698