aboutsummaryrefslogtreecommitdiff
path: root/src/threading/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/threading/cpu.c')
-rw-r--r--src/threading/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/threading/cpu.c b/src/threading/cpu.c
new file mode 100644
index 0000000..45671df
--- /dev/null
+++ b/src/threading/cpu.c
@@ -0,0 +1,6 @@
+#include <sys/sysinfo.h>
+
+int get_core_count()
+{
+ return get_nprocs();
+}