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

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

Issue 1784623005: Test dynamic priorities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // to raise its priority back up after lowering it if the process does not 184 // to raise its priority back up after lowering it if the process does not
185 // have a proper permission, e.g. CAP_SYS_NICE on Linux. A thread may not be 185 // have a proper permission, e.g. CAP_SYS_NICE on Linux. A thread may not be
186 // able to lower its priority back down after raising it to REALTIME_AUDIO. 186 // able to lower its priority back down after raising it to REALTIME_AUDIO.
187 // Since changing other threads' priority is not permitted in favor of 187 // Since changing other threads' priority is not permitted in favor of
188 // security, this interface is restricted to change only the current thread 188 // security, this interface is restricted to change only the current thread
189 // priority (https://crbug.com/399473). 189 // priority (https://crbug.com/399473).
190 static void SetCurrentThreadPriority(ThreadPriority priority); 190 static void SetCurrentThreadPriority(ThreadPriority priority);
191 191
192 static ThreadPriority GetCurrentThreadPriority(); 192 static ThreadPriority GetCurrentThreadPriority();
193 193
194 static bool SetThreadPriority(PlatformThreadId tid, ThreadPriority priority);
195
194 private: 196 private:
195 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 197 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
196 }; 198 };
197 199
198 } // namespace base 200 } // namespace base
199 201
200 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 202 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/ThreadUtils.java ('k') | base/threading/platform_thread_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698