aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/api/lzma
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/api/lzma
parentxz: Check for filter chain compatibility for --flush-timeout. (diff)
downloadxz-a115cc3748482e277f42a968baa3cd266f031dba.tar.xz
liblzma: Add lzma_cputhreads().
Diffstat (limited to 'src/liblzma/api/lzma')
-rw-r--r--src/liblzma/api/lzma/hardware.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/liblzma/api/lzma/hardware.h b/src/liblzma/api/lzma/hardware.h
index e7dd03c3..5321d9af 100644
--- a/src/liblzma/api/lzma/hardware.h
+++ b/src/liblzma/api/lzma/hardware.h
@@ -48,3 +48,17 @@
* of RAM on the specific operating system.
*/
extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow;
+
+
+/**
+ * \brief Get the number of processor cores or threads
+ *
+ * This function may be useful when determining how many threads to use.
+ * If the hardware supports more than one thread per CPU core, the number
+ * of hardware threads is returned if that information is available.
+ *
+ * \brief On success, the number of available CPU threads or cores is
+ * returned. If this information isn't available or an error
+ * occurs, zero is returned.
+ */
+extern LZMA_API(uint32_t) lzma_cputhreads(void) lzma_nothrow;