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

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

Issue 2334533002: base: Move renderer threads to the appropriate cpuset. (Closed)
Patch Set: v3 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 // Warning: Don't use this for a main thread because that will change the
210 // whole thread group's (i.e. process) priority.
211 static void SetThreadPriority(PlatformThreadId thread_id,
212 ThreadPriority priority);
213 #endif
Avi (use Gerrit) 2016/09/16 22:26:29 You ifdef this to the platform, but don't ifdef an
reveman 2016/09/16 23:06:41 What other code are you referring to? I didn't ifd
Avi (use Gerrit) 2016/09/17 00:55:54 Yes, I'm referring to the RenderMessageFilter code
reveman 2016/09/17 09:13:36 Latest patch will ifdef all the code to linux only
214
208 private: 215 private:
209 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread); 216 DISALLOW_IMPLICIT_CONSTRUCTORS(PlatformThread);
210 }; 217 };
211 218
212 } // namespace base 219 } // namespace base
213 220
214 #endif // BASE_THREADING_PLATFORM_THREAD_H_ 221 #endif // BASE_THREADING_PLATFORM_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698