OLD | NEW |
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/logging.h" | 8 #include "base/logging.h" |
9 #include "base/threading/thread_local.h" | 9 #include "base/threading/thread_local.h" |
10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // static | 179 // static |
180 void PlatformThread::SetThreadPriority(PlatformThreadHandle handle, | 180 void PlatformThread::SetThreadPriority(PlatformThreadHandle handle, |
181 ThreadPriority priority) { | 181 ThreadPriority priority) { |
182 switch (priority) { | 182 switch (priority) { |
183 case kThreadPriority_Normal: | 183 case kThreadPriority_Normal: |
184 ::SetThreadPriority(handle, THREAD_PRIORITY_NORMAL); | 184 ::SetThreadPriority(handle, THREAD_PRIORITY_NORMAL); |
185 break; | 185 break; |
186 case kThreadPriority_RealtimeAudio: | 186 case kThreadPriority_RealtimeAudio: |
187 ::SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL); | 187 ::SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL); |
188 break; | 188 break; |
189 default: | |
190 NOTIMPLEMENTED(); | |
191 break; | |
192 } | 189 } |
193 } | 190 } |
194 | 191 |
195 } // namespace base | 192 } // namespace base |
OLD | NEW |