aboutsummaryrefslogtreecommitdiff
path: root/contrib/xz/src/liblzma/api/lzma/hardware.h
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2015-02-11 18:59:46 +0000
committerGlen Barber <gjb@FreeBSD.org>2015-02-11 18:59:46 +0000
commit53f2fbcab4ca497c4bed5e5728534468e2b9e992 (patch)
tree303a2448e6e55aa1910e1ff2c6a77612730d280f /contrib/xz/src/liblzma/api/lzma/hardware.h
parentccb7bf26233e1b6ef1dcb23ac7206beb53dcaff7 (diff)
parent399d34850fe953934b6516ac78dfc3c7aed1e10f (diff)
downloadsrc-53f2fbcab4ca497c4bed5e5728534468e2b9e992.tar.gz
src-53f2fbcab4ca497c4bed5e5728534468e2b9e992.zip
MFH: r278202,r278205-r278590
Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-arm-redux/; revision=278591
Diffstat (limited to 'contrib/xz/src/liblzma/api/lzma/hardware.h')
-rw-r--r--contrib/xz/src/liblzma/api/lzma/hardware.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/xz/src/liblzma/api/lzma/hardware.h b/contrib/xz/src/liblzma/api/lzma/hardware.h
index e7dd03c3e8dd..5321d9af8e46 100644
--- a/contrib/xz/src/liblzma/api/lzma/hardware.h
+++ b/contrib/xz/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;