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

Side by Side Diff: base/threading/platform_thread_posix.cc

Issue 1739993004: content: Implement dynamic priorities for raster threads. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: preparing for checkin. 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 #include "base/threading/platform_thread.h" 5 #include "base/threading/platform_thread.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <pthread.h> 8 #include <pthread.h>
9 #include <sched.h> 9 #include <sched.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 if (errno != 0) { 252 if (errno != 0) {
253 DVPLOG(1) << "Failed to get nice value of thread (" 253 DVPLOG(1) << "Failed to get nice value of thread ("
254 << PlatformThread::CurrentId() << ")"; 254 << PlatformThread::CurrentId() << ")";
255 return ThreadPriority::NORMAL; 255 return ThreadPriority::NORMAL;
256 } 256 }
257 257
258 return internal::NiceValueToThreadPriority(nice_value); 258 return internal::NiceValueToThreadPriority(nice_value);
259 #endif // !defined(OS_NACL) 259 #endif // !defined(OS_NACL)
260 } 260 }
261 261
262 // static
263 bool PlatformThread::SetChildThreadPriorityInCurrentProcess(
264 PlatformThreadHandle thread_handle,
265 PlatformThreadId tid,
266 ThreadPriority priority) {
267 // FIXME: Add check for caller process and thread's process.
268 return internal::SetChildThreadPriorityInCurrentProcess(tid, priority);
269 }
270
262 #endif // !defined(OS_MACOSX) 271 #endif // !defined(OS_MACOSX)
263 272
264 } // namespace base 273 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698