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. |