Chromium Code Reviews| Index: base/threading/platform_thread_win.cc |
| =================================================================== |
| --- base/threading/platform_thread_win.cc (revision 104087) |
| +++ base/threading/platform_thread_win.cc (working copy) |
| @@ -157,9 +157,16 @@ |
| } |
| // static |
| -void PlatformThread::SetThreadPriority(PlatformThreadHandle, ThreadPriority) { |
| - // TODO(crogers): implement |
| - NOTIMPLEMENTED(); |
| +void PlatformThread::SetThreadPriority(PlatformThreadHandle handle, |
| + ThreadPriority priority) { |
| + switch (priority) { |
| + case kThreadPriority_Normal: |
| + ::SetThreadPriority(handle, THREAD_PRIORITY_NORMAL); |
| + break; |
| + case kThreadPriority_RealtimeAudio: |
| + ::SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL); |
| + break; |
|
tommi (sloooow) - chröme
2011/10/14 14:31:04
should we have a NOTIMPLEMENTED for default:?
henrika (OOO until Aug 14)
2011/10/17 12:08:24
Done.
|
| + } |
| } |
| } // namespace base |