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

Side by Side Diff: base/threading/platform_thread_win.cc

Issue 292873002: make debug mode ~20% faster on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment updated Created 6 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/threading/platform_thread_posix.cc ('k') | base/threading/thread_checker_impl.h » ('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 #include "base/threading/platform_thread.h" 5 #include "base/threading/platform_thread.h"
6 6
7 #include "base/debug/alias.h" 7 #include "base/debug/alias.h"
8 #include "base/debug/profiler.h" 8 #include "base/debug/profiler.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/threading/thread_id_name_manager.h" 10 #include "base/threading/thread_id_name_manager.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 } // namespace 125 } // namespace
126 126
127 // static 127 // static
128 PlatformThreadId PlatformThread::CurrentId() { 128 PlatformThreadId PlatformThread::CurrentId() {
129 return GetCurrentThreadId(); 129 return GetCurrentThreadId();
130 } 130 }
131 131
132 // static 132 // static
133 PlatformThreadRef PlatformThread::CurrentRef() {
134 return PlatformThreadRef(GetCurrentThreadId());
135 }
136
137 // static
133 PlatformThreadHandle PlatformThread::CurrentHandle() { 138 PlatformThreadHandle PlatformThread::CurrentHandle() {
134 NOTIMPLEMENTED(); // See OpenThread() 139 NOTIMPLEMENTED(); // See OpenThread()
135 return PlatformThreadHandle(); 140 return PlatformThreadHandle();
136 } 141 }
137 142
138 // static 143 // static
139 void PlatformThread::YieldCurrentThread() { 144 void PlatformThread::YieldCurrentThread() {
140 ::Sleep(0); 145 ::Sleep(0);
141 } 146 }
142 147
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 case kThreadPriority_RealtimeAudio: 242 case kThreadPriority_RealtimeAudio:
238 ::SetThreadPriority(handle.handle_, THREAD_PRIORITY_TIME_CRITICAL); 243 ::SetThreadPriority(handle.handle_, THREAD_PRIORITY_TIME_CRITICAL);
239 break; 244 break;
240 default: 245 default:
241 NOTREACHED() << "Unknown priority."; 246 NOTREACHED() << "Unknown priority.";
242 break; 247 break;
243 } 248 }
244 } 249 }
245 250
246 } // namespace base 251 } // namespace base
OLDNEW
« no previous file with comments | « base/threading/platform_thread_posix.cc ('k') | base/threading/thread_checker_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698