freebsd-dev/lib/libthr
Dmitry Chagin 01f74ccd5a libthr: Fix pthread_attr_[g|s]etaffinity_np to match it's manual and the kernel.
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.

To match pthread_attr_[g|s]etaffinity_np checks of the user-provided cpusets to
the kernel behavior export the minimum cpuset_t size allowed by running kernel
via new sysctl kern.sched.cpusetsizemin and use it in checks.

Reviewed by:
Differential Revision:	https://reviews.freebsd.org/D38112
MFC after:		1 week
2023-01-29 15:35:18 +03:00
..
arch Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
sys spdx: initial adoption of licensing ID tags. 2017-11-18 14:26:50 +00:00
tests _umtx_op: fix a compat32 bug in UMTX_OP_NWAKE_PRIVATE 2020-11-17 03:34:01 +00:00
thread libthr: Fix pthread_attr_[g|s]etaffinity_np to match it's manual and the kernel. 2023-01-29 15:35:18 +03:00
libthr.3 libthr(3): explain some internals of the locks implementation 2021-10-05 06:39:53 +03:00
Makefile libthr: Disable stack unwinding on ARM. 2022-02-10 12:47:08 -08:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
plockstat.d
pthread.map rtld: workaround for broken ABI 2021-04-10 17:33:33 +03:00