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

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

Issue 2334533002: base: Move renderer threads to the appropriate cpuset. (Closed)
Patch Set: Created 4 years, 3 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // to raise its priority back up after lowering it if the process does not 198 // to raise its priority back up after lowering it if the process does not
199 // have a proper permission, e.g. CAP_SYS_NICE on Linux. A thread may not be 199 // have a proper permission, e.g. CAP_SYS_NICE on Linux. A thread may not be
200 // able to lower its priority back down after raising it to REALTIME_AUDIO. 200 // able to lower its priority back down after raising it to REALTIME_AUDIO.
201 // Since changing other threads' priority is not permitted in favor of 201 // Since changing other threads' priority is not permitted in favor of
202 // security, this interface is restricted to change only the current thread 202 // security, this interface is restricted to change only the current thread
203 // priority (https://crbug.com/399473). 203 // priority (https://crbug.com/399473).
204 static void SetCurrentThreadPriority(ThreadPriority priority); 204 static void SetCurrentThreadPriority(ThreadPriority priority);
205 205
206 static ThreadPriority GetCurrentThreadPriority(); 206 static ThreadPriority GetCurrentThreadPriority();
207 207
208 #if defined(OS_LINUX)
209 static void SetThreadAffinity(PlatformThreadId id, ThreadPriority priority);
210 #endif
211
208 private: 212 private:
209 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 213 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
210 }; 214 };
211 215
212 } // namespace base 216 } // namespace base
213 217
214 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 218 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | base/threading/platform_thread_linux.cc » ('j') | base/threading/platform_thread_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698