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

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

Issue 1123833003: Revert of Revert some other possible suspects of a 0.43% size increase of setup.exe: https://build.chromium.o… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « base/files/file_win.cc ('k') | base/threading/platform_thread_android.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 // WARNING: You should *NOT* be using this class directly. PlatformThread is 5 // WARNING: You should *NOT* be using this class directly. PlatformThread is
6 // the low-level platform-specific abstraction to the OS's threading interface. 6 // the low-level platform-specific abstraction to the OS's threading interface.
7 // You should instead be using a message-loop driven Thread, see thread.h. 7 // You should instead be using a message-loop driven Thread, see thread.h.
8 8
9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_ 9 #ifndef BASE_THREADING_PLATFORM_THREAD_H_
10 #define BASE_THREADING_PLATFORM_THREAD_H_ 10 #define BASE_THREADING_PLATFORM_THREAD_H_
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // the current thread from another. 149 // the current thread from another.
150 static PlatformThreadHandle CurrentHandle(); 150 static PlatformThreadHandle CurrentHandle();
151 151
152 // Yield the current thread so another thread can be scheduled. 152 // Yield the current thread so another thread can be scheduled.
153 static void YieldCurrentThread(); 153 static void YieldCurrentThread();
154 154
155 // Sleeps for the specified duration. 155 // Sleeps for the specified duration.
156 static void Sleep(base::TimeDelta duration); 156 static void Sleep(base::TimeDelta duration);
157 157
158 // Sets the thread name visible to debuggers/tools. This has no effect 158 // Sets the thread name visible to debuggers/tools. This has no effect
159 // otherwise. This name pointer is not copied internally. Thus, it must stay 159 // otherwise.
160 // valid until the thread ends. 160 static void SetName(const std::string& name);
161 static void SetName(const char* name);
162 161
163 // Gets the thread name, if previously set by SetName. 162 // Gets the thread name, if previously set by SetName.
164 static const char* GetName(); 163 static const char* GetName();
165 164
166 // Creates a new thread. The |stack_size| parameter can be 0 to indicate 165 // Creates a new thread. The |stack_size| parameter can be 0 to indicate
167 // that the default stack size should be used. Upon success, 166 // that the default stack size should be used. Upon success,
168 // |*thread_handle| will be assigned a handle to the newly created thread, 167 // |*thread_handle| will be assigned a handle to the newly created thread,
169 // and |delegate|'s ThreadMain method will be executed on the newly created 168 // and |delegate|'s ThreadMain method will be executed on the newly created
170 // thread. 169 // thread.
171 // NOTE: When you are done with the thread handle, you must call Join to 170 // NOTE: When you are done with the thread handle, you must call Join to
(...skipping 24 matching lines...) Expand all
196 195
197 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle); 196 static ThreadPriority GetThreadPriority(PlatformThreadHandle handle);
198 197
199 private: 198 private:
200 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 199 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
201 }; 200 };
202 201
203 } // namespace base 202 } // namespace base
204 203
205 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 204 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW
« no previous file with comments | « base/files/file_win.cc ('k') | base/threading/platform_thread_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698