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

Unified Diff: src/platform-posix.cc

Issue 300713002: Move NumberOfProcessorsOnline from CPU to OS (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index be1ace1d628000512082718bcc3c368efc76c3c9..1972505565eef5c7dff7cb0a282a750547d7bdf0 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -57,6 +57,11 @@ unsigned OS::CpuFeaturesImpliedByPlatform() {
}
+int OS::NumberOfProcessorsOnline() {
+ return static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
+}
+
+
// Maximum size of the virtual memory. 0 means there is no artificial
// limit.
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698