]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
For llvm's internal function which retrieves the number of available
authordim <dim@FreeBSD.org>
Wed, 18 Nov 2020 19:55:24 +0000 (19:55 +0000)
committerdim <dim@FreeBSD.org>
Wed, 18 Nov 2020 19:55:24 +0000 (19:55 +0000)
commit7ca012e7ecf3aa737a054c53f8b6f80febfddfe6
treebf212c2d511994c4ede69fae010c77c65b7c9b88
parent46b7baedd2f0cd0fc99d6fd307789d4aeceb69c5
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
MFC after: 1 week
contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc