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

Side by Side Diff: base/threading/platform_thread_freebsd.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <sched.h> 8 #include <sched.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 &maybe_realtime_prio) == 0 && 55 &maybe_realtime_prio) == 0 &&
56 maybe_sched_rr == SCHED_RR && 56 maybe_sched_rr == SCHED_RR &&
57 maybe_realtime_prio.sched_priority == kRealTimePrio.sched_priority) { 57 maybe_realtime_prio.sched_priority == kRealTimePrio.sched_priority) {
58 *priority = ThreadPriority::REALTIME_AUDIO; 58 *priority = ThreadPriority::REALTIME_AUDIO;
59 return true; 59 return true;
60 } 60 }
61 #endif 61 #endif
62 return false; 62 return false;
63 } 63 }
64 64
65 bool SetChildThreadPriorityInCurrentProcess(PlatformThreadId tid,
66 ThreadPriority priority) {
67 NOTIMPLEMENTED();
68 return false;
69 }
70
65 } // namespace internal 71 } // namespace internal
66 72
67 // static 73 // static
68 void PlatformThread::SetName(const std::string& name) { 74 void PlatformThread::SetName(const std::string& name) {
69 ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name); 75 ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
70 tracked_objects::ThreadData::InitializeThreadContext(name); 76 tracked_objects::ThreadData::InitializeThreadContext(name);
71 77
72 #if !defined(OS_NACL) 78 #if !defined(OS_NACL)
73 // On FreeBSD we can get the thread names to show up in the debugger by 79 // On FreeBSD we can get the thread names to show up in the debugger by
74 // setting the process name for the LWP. We don't want to do this for the 80 // setting the process name for the LWP. We don't want to do this for the
(...skipping 13 matching lines...) Expand all
88 #if !defined(THREAD_SANITIZER) 94 #if !defined(THREAD_SANITIZER)
89 return 0; 95 return 0;
90 #else 96 #else
91 // ThreadSanitizer bloats the stack heavily. Evidence has been that the 97 // ThreadSanitizer bloats the stack heavily. Evidence has been that the
92 // default stack size isn't enough for some browser tests. 98 // default stack size isn't enough for some browser tests.
93 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). 99 return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux).
94 #endif 100 #endif
95 } 101 }
96 102
97 } // namespace base 103 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698