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

Unified Diff: src/platform-win32.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-posix.cc ('k') | test/cctest/test-cpu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index df0ec2ebaf88447deef2e30fd5615629e680e050..9c7f5a9b4f521477117e56447f354ff20273fb5e 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -1196,6 +1196,13 @@ unsigned OS::CpuFeaturesImpliedByPlatform() {
}
+int OS::NumberOfProcessorsOnline() {
+ SYSTEM_INFO info;
+ GetSystemInfo(&info);
+ return info.dwNumberOfProcessors;
+}
+
+
double OS::nan_value() {
#ifdef _MSC_VER
// Positive Quiet NaN with no payload (aka. Indeterminate) has all bits
« no previous file with comments | « src/platform-posix.cc ('k') | test/cctest/test-cpu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698