From a115cc3748482e277f42a968baa3cd266f031dba Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Wed, 18 Jun 2014 22:04:24 +0300 Subject: liblzma: Add lzma_cputhreads(). --- src/liblzma/api/lzma/hardware.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/liblzma/api') 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; -- cgit v1.2.3