From a36774be636c3429c6e73de33bf65a1bdbdcfb4b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 27 Feb 2025 13:39:04 -0500 Subject: bfstd: Take sched_getaffinity() into account in nproc() --- build/has/sched-getaffinity.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 build/has/sched-getaffinity.c (limited to 'build/has') diff --git a/build/has/sched-getaffinity.c b/build/has/sched-getaffinity.c new file mode 100644 index 0000000..6f8fd98 --- /dev/null +++ b/build/has/sched-getaffinity.c @@ -0,0 +1,9 @@ +// Copyright © Tavian Barnes +// SPDX-License-Identifier: 0BSD + +#include + +int main(void) { + cpu_set_t set; + return sched_getaffinity(0, sizeof(set), &set); +} -- cgit v1.2.3