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

Unified Diff: chrome/nacl/nacl_listener.cc

Issue 14238013: Set up NaClChromeMainArgs number_of_cores member so apps can size threadpools appropriately (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR fb Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/nacl/nacl_listener.h ('k') | chrome/nacl/nacl_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/nacl/nacl_listener.cc
diff --git a/chrome/nacl/nacl_listener.cc b/chrome/nacl/nacl_listener.cc
index 5f3ced4af92f8cea3ce22ca52e71717cb3aa5f02..477be0ed4d8ef6695b869b40d1d64621c3e883ce 100644
--- a/chrome/nacl/nacl_listener.cc
+++ b/chrome/nacl/nacl_listener.cc
@@ -7,6 +7,10 @@
#include <errno.h>
#include <stdlib.h>
+#if defined(OS_POSIX)
+#include <unistd.h>
+#endif
+
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -141,6 +145,9 @@ NaClListener::NaClListener() : shutdown_event_(true, false),
#if defined(OS_LINUX)
prereserved_sandbox_size_(0),
#endif
+#if defined(OS_POSIX)
+ number_of_cores_(-1), // unknown/error
+#endif
main_loop_(NULL) {
io_thread_.StartWithOptions(base::Thread::Options(MessageLoop::TYPE_IO, 0));
#if defined(OS_WIN)
@@ -226,6 +233,7 @@ void NaClListener::OnStart(const nacl::NaClStartParams& params) {
LOG(ERROR) << "Failed to dup() the urandom FD";
return;
}
+ args->number_of_cores = number_of_cores_;
args->create_memory_object_func = CreateMemoryObject;
# if defined(OS_MACOSX)
CHECK(handles.size() >= 1);
« no previous file with comments | « chrome/nacl/nacl_listener.h ('k') | chrome/nacl/nacl_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698