diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2025-02-27 13:39:04 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2025-02-27 13:39:04 -0500 |
commit | a36774be636c3429c6e73de33bf65a1bdbdcfb4b (patch) | |
tree | 525d358367a4e936dc197c94ca488a3dc822239a /build/has | |
parent | 5798978f77ef8c3efb3c99fa7fb9538c5c597024 (diff) | |
download | bfs-a36774be636c3429c6e73de33bf65a1bdbdcfb4b.tar.xz |
bfstd: Take sched_getaffinity() into account in nproc()
Diffstat (limited to 'build/has')
-rw-r--r-- | build/has/sched-getaffinity.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 <tavianator@tavianator.com> +// SPDX-License-Identifier: 0BSD + +#include <sched.h> + +int main(void) { + cpu_set_t set; + return sched_getaffinity(0, sizeof(set), &set); +} |