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

Side by Side Diff: content/child/child_process.cc

Issue 2334533002: base: Move renderer threads to the appropriate cpuset. (Closed)
Patch Set: revert to CHECK_NE 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
« no previous file with comments | « content/child/child_process.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/child/child_process.h" 5 #include "content/child/child_process.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 DCHECK(!main_thread_.get() || // null in unittests. 96 DCHECK(!main_thread_.get() || // null in unittests.
97 main_thread_->message_loop()->task_runner()->BelongsToCurrentThread()); 97 main_thread_->message_loop()->task_runner()->BelongsToCurrentThread());
98 DCHECK(ref_count_); 98 DCHECK(ref_count_);
99 if (--ref_count_) 99 if (--ref_count_)
100 return; 100 return;
101 101
102 if (main_thread_) // null in unittests. 102 if (main_thread_) // null in unittests.
103 main_thread_->OnProcessFinalRelease(); 103 main_thread_->OnProcessFinalRelease();
104 } 104 }
105 105
106 #if defined(OS_LINUX)
107 void ChildProcess::SetIOThreadPriority(
108 base::ThreadPriority io_thread_priority) {
109 main_thread_->SetThreadPriority(io_thread_.GetThreadId(), io_thread_priority);
110 }
111 #endif
112
106 ChildProcess* ChildProcess::current() { 113 ChildProcess* ChildProcess::current() {
107 return g_lazy_tls.Pointer()->Get(); 114 return g_lazy_tls.Pointer()->Get();
108 } 115 }
109 116
110 base::WaitableEvent* ChildProcess::GetShutDownEvent() { 117 base::WaitableEvent* ChildProcess::GetShutDownEvent() {
111 return &shutdown_event_; 118 return &shutdown_event_;
112 } 119 }
113 120
114 void ChildProcess::WaitForDebugger(const std::string& label) { 121 void ChildProcess::WaitForDebugger(const std::string& label) {
115 #if defined(OS_WIN) 122 #if defined(OS_WIN)
(...skipping 29 matching lines...) Expand all
145 memset(&sa, 0, sizeof(sa)); 152 memset(&sa, 0, sizeof(sa));
146 sa.sa_handler = SigUSR1Handler; 153 sa.sa_handler = SigUSR1Handler;
147 sigaction(SIGUSR1, &sa, NULL); 154 sigaction(SIGUSR1, &sa, NULL);
148 155
149 pause(); 156 pause();
150 #endif // defined(OS_ANDROID) 157 #endif // defined(OS_ANDROID)
151 #endif // defined(OS_POSIX) 158 #endif // defined(OS_POSIX)
152 } 159 }
153 160
154 } // namespace content 161 } // namespace content
OLDNEW
« no previous file with comments | « content/child/child_process.h ('k') | content/child/child_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698