aboutsummaryrefslogtreecommitdiff
path: root/src/common/tuklib_gettext.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2016-10-24 18:51:36 +0300
committerLasse Collin <lasse.collin@tukaani.org>2016-12-26 17:24:09 +0200
commit88d7a7fd153bf1355cdf798ffdac7443d0169afc (patch)
tree6fa34b9b21db79e901b4d1953b3364026cc68971 /src/common/tuklib_gettext.h
parentxz: Fix copying of timestamps on Windows. (diff)
downloadxz-88d7a7fd153bf1355cdf798ffdac7443d0169afc.tar.xz
tuklib_cpucores: Add support for sched_getaffinity().
It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity() gives the number of cores available to the process instead of the total number of cores online. As a side effect, this commit fixes a bug on GNU/kFreeBSD where configure would detect the FreeBSD-specific cpuset_getaffinity() but it wouldn't actually work because on GNU/kFreeBSD it requires using -lfreebsd-glue when linking. Now the glibc-specific function will be used instead. Thanks to Sebastian Andrzej Siewior for the original patch and testing.
Diffstat (limited to 'src/common/tuklib_gettext.h')
0 files changed, 0 insertions, 0 deletions