Index: src/platform-linux.cc |
diff --git a/src/platform-linux.cc b/src/platform-linux.cc |
index 6c724bd016a2a6841cfb8a8065c25c89688f311e..0359b2d79e98d59f8ea8f1f5d7970607b581bc44 100644 |
--- a/src/platform-linux.cc |
+++ b/src/platform-linux.cc |
@@ -403,6 +403,11 @@ void OS::Sleep(int milliseconds) { |
} |
+int OS::NumberOfCores() { |
+ return sysconf(_SC_NPROCESSORS_ONLN); |
+} |
+ |
+ |
void OS::Abort() { |
// Redirect to std abort to signal abnormal program termination. |
if (FLAG_break_on_abort) { |