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

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

Issue 1620673003: base: Implement GetCurrentThreadPriority. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase error. Created 4 years, 9 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
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 private: 94 private:
95 Handle handle_; 95 Handle handle_;
96 }; 96 };
97 97
98 const PlatformThreadId kInvalidThreadId(0); 98 const PlatformThreadId kInvalidThreadId(0);
99 99
100 // Valid values for priority of Thread::Options and SimpleThread::Options, and 100 // Valid values for priority of Thread::Options and SimpleThread::Options, and
101 // SetCurrentThreadPriority(), listed in increasing order of importance. 101 // SetCurrentThreadPriority(), listed in increasing order of importance.
102 enum class ThreadPriority { 102 enum class ThreadPriority : int {
103 // Suitable for threads that shouldn't disrupt high priority work. 103 // Suitable for threads that shouldn't disrupt high priority work.
104 BACKGROUND, 104 BACKGROUND,
105 // Default priority level. 105 // Default priority level.
106 NORMAL, 106 NORMAL,
107 // Suitable for threads which generate data for the display (at ~60Hz). 107 // Suitable for threads which generate data for the display (at ~60Hz).
108 DISPLAY, 108 DISPLAY,
109 // Suitable for low-latency, glitch-resistant audio. 109 // Suitable for low-latency, glitch-resistant audio.
110 REALTIME_AUDIO, 110 REALTIME_AUDIO,
111 }; 111 };
112 112
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 static ThreadPriority GetCurrentThreadPriority(); 192 static ThreadPriority GetCurrentThreadPriority();
193 193
194 private: 194 private:
195 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 195 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
196 }; 196 };
197 197
198 } // namespace base 198 } // namespace base
199 199
200 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 200 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | base/threading/platform_thread_mac.mm » ('j') | base/threading/platform_thread_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698