HomeFreeBSD

libthr: Fix pthread_[g|s]etaffinity_np manual.

Description

libthr: Fix pthread_[g|s]etaffinity_np manual.

Since f35093f8 semantics of a thread affinity functions is changed to be a
compatible with Linux:
In case of getaffinity(), the minimum cpuset_t size that the kernel permits is
the maximum CPU id, present in the system, / NBBY bytes, the maximum size is not
limited.
In case of setaffinity(), the kernel does not limit the size of the user-provided
cpuset_t, internally using only the meaningful part of the set, where the upper
bound is the maximum CPU id, present in the system, no larger than the size of
the kernel cpuset_t.

Reviewed by: jhb, kib
Differential Revision: https://reviews.freebsd.org/D38111
MFC after: 1 week

(cherry picked from commit 62801712dfc17fed6f8d4c9b64dca18d51a2bf9b)

Details

Provenance
dchaginAuthored on Jan 29 2023, 12:36 PM
Reviewer
jhb
Differential Revision
D38111: libthr: Fix pthread_[g|s]etaffinity_np manual.
Parents
rGbdb06df5ca6e: libthr: Fix pthread_attr_[g|s]etaffinity_np to match it's manual and the kernel.
Branches
Unknown
Tags
Unknown