1 ///////////////////////////////////////////////////////////////////////////////
3 /// \file hardware_cputhreads.c
4 /// \brief Get the number of CPU threads or cores
6 // Author: Lasse Collin
8 // This file has been put into the public domain.
9 // You can do whatever you want with this file.
11 ///////////////////////////////////////////////////////////////////////////////
15 #include "tuklib_cpucores.h"
18 #ifdef HAVE_SYMBOL_VERSIONS_LINUX
19 // This is for compatibility with binaries linked against liblzma that
20 // has been patched with xz-5.2.2-compat-libs.patch from RHEL/CentOS 7.
21 LZMA_SYMVER_API("lzma_cputhreads@XZ_5.2.2",
22 uint32_t, lzma_cputhreads_522
)(void) lzma_nothrow
23 __attribute__((__alias__("lzma_cputhreads_52")));
25 LZMA_SYMVER_API("lzma_cputhreads@@XZ_5.2",
26 uint32_t, lzma_cputhreads_52
)(void) lzma_nothrow
;
28 #define lzma_cputhreads lzma_cputhreads_52
30 extern LZMA_API(uint32_t)
33 return tuklib_cpucores();