]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Revert r367815, so we can apply the slightly different version that
authordim <dim@FreeBSD.org>
Thu, 3 Dec 2020 19:26:21 +0000 (19:26 +0000)
committerdim <dim@FreeBSD.org>
Thu, 3 Dec 2020 19:26:21 +0000 (19:26 +0000)
commit60e2665c4f3ce1930f40048830565ff123463c29
tree67673a001da0d1df60b4ac4741e3fd91eb6c46db
parentf37597970355443b7ff81406a30e6e510d3382b5
Revert r367815, so we can apply the slightly different version that
landed upstream:

For llvm's internal function which retrieves the number of available
"hardware threads", use cpuset_getaffinity(2) on FreeBSD, so it will
honor processor sets configured by the cpuset(1) command.

This should make it possible to avoid e.g. lld creating a huge number of
threads on a machine with many cores, even for linking simple programs.

This will also be submitted upstream.

Submitted by: mjg
contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc