aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/hardware_cputhreads.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/common/hardware_cputhreads.c')
-rw-r--r--src/liblzma/common/hardware_cputhreads.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/liblzma/common/hardware_cputhreads.c b/src/liblzma/common/hardware_cputhreads.c
new file mode 100644
index 00000000..f468366a
--- /dev/null
+++ b/src/liblzma/common/hardware_cputhreads.c
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file hardware_cputhreads.c
+/// \brief Get the number of CPU threads or cores
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+#include "tuklib_cpucores.h"
+
+
+extern LZMA_API(uint32_t)
+lzma_cputhreads(void)
+{
+ return tuklib_cpucores();
+}