aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/common/hardware_cputhreads.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2014-06-18 22:04:24 +0300
committerLasse Collin <lasse.collin@tukaani.org>2014-06-18 22:04:24 +0300
commita115cc3748482e277f42a968baa3cd266f031dba (patch)
tree54cf051c55d0aadd67a5b2d5a9edb6b57a09c787 /src/liblzma/common/hardware_cputhreads.c
parentxz: Check for filter chain compatibility for --flush-timeout. (diff)
downloadxz-a115cc3748482e277f42a968baa3cd266f031dba.tar.xz
liblzma: Add lzma_cputhreads().
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();
+}