summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/linux.c6
-rw-r--r--sysdeps/solaris.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/linux.c b/sysdeps/linux.c
index 52b6e78..ab8710e 100644
--- a/sysdeps/linux.c
+++ b/sysdeps/linux.c
@@ -283,3 +283,9 @@ sysdep_uptime ()
}
return (long) uptime;
}
+
+int
+sysdep_number_of_cpus ()
+{
+ return sysconf (_SC_NPROCESSORS_ONLN);
+}
diff --git a/sysdeps/solaris.c b/sysdeps/solaris.c
index 705ec9c..243975c 100644
--- a/sysdeps/solaris.c
+++ b/sysdeps/solaris.c
@@ -375,3 +375,9 @@ sysdep_uptime ()
}
return uptime;
}
+
+int
+sysdep_number_of_cpus ()
+{
+ return sysconf (_SC_NPROCESSORS_ONLN);
+}