1 // SPDX-License-Identifier: 0BSD
3 ///////////////////////////////////////////////////////////////////////////////
5 /// \file hardware_cputhreads.c
6 /// \brief Get the number of CPU threads or cores
8 // Author: Lasse Collin
10 ///////////////////////////////////////////////////////////////////////////////
14 #include "tuklib_cpucores.h"
17 #ifdef HAVE_SYMBOL_VERSIONS_LINUX
18 // This is for compatibility with binaries linked against liblzma that
19 // has been patched with xz-5.2.2-compat-libs.patch from RHEL/CentOS 7.
20 LZMA_SYMVER_API("lzma_cputhreads@XZ_5.2.2",
21 uint32_t, lzma_cputhreads_522
)(void) lzma_nothrow
22 __attribute__((__alias__("lzma_cputhreads_52")));
24 LZMA_SYMVER_API("lzma_cputhreads@@XZ_5.2",
25 uint32_t, lzma_cputhreads_52
)(void) lzma_nothrow
;
27 #define lzma_cputhreads lzma_cputhreads_52
29 extern LZMA_API(uint32_t)
32 return tuklib_cpucores();