freebsd-dev/lib/libthr/thread
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
..
Makefile.inc
thr_affinity.c
thr_attr.c libthr: Fix pthread_attr_[g|s]etaffinity_np to match it's manual and the kernel. 2023-01-29 15:35:18 +03:00
thr_autoinit.c libthr(3): Fix a typo in a source code comment 2023-01-11 11:48:14 +01:00
thr_barrier.c Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
thr_barrierattr.c
thr_cancel.c
thr_clean.c
thr_concurrency.c
thr_cond.c Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
thr_condattr.c
thr_create.c
thr_ctrdtr.c libthr: Use TLS_TCB_* in _tcb_[cd]tor. 2022-01-25 11:38:34 -08:00
thr_detach.c
thr_equal.c
thr_event.c
thr_exit.c Use uintptr_t for return type of _Unwind_GetCFA. 2022-01-27 10:53:21 -08:00
thr_fork.c libthr: wrap pdfork(2), same as fork(2). 2021-01-11 22:59:52 +02:00
thr_getcpuclockid.c
thr_getprio.c
thr_getschedparam.c
thr_getthreadid_np.c
thr_info.c Add pthread_getname_np() and pthread_setname_np() aliases for 2020-06-10 22:13:24 +00:00
thr_init.c libthr: extract code to get main stack base and size into helpers 2022-09-16 23:24:12 +03:00
thr_join.c Add pthread_peekjoin_np(3). 2020-02-15 23:25:39 +00:00
thr_kern.c Use the existing page size in libthr 2022-05-03 11:04:06 +01:00
thr_kill.c
thr_list.c
thr_main_np.c
thr_malloc.c Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
thr_multi_np.c
thr_mutex.c Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
thr_mutexattr.c
thr_once.c
thr_printf.c
thr_private.h libthr: extract code to get main stack base and size into helpers 2022-09-16 23:24:12 +03:00
thr_pshared.c Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
thr_pspinlock.c Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
thr_resume_np.c
thr_rtld.c rtld: make dlerror() thread-local 2021-04-10 17:33:34 +03:00
thr_rwlock.c Remove PAGE_SIZE from libthr 2022-05-03 11:04:41 +01:00
thr_rwlockattr.c
thr_self.c
thr_sem.c
thr_setprio.c
thr_setschedparam.c
thr_sig.c
thr_single_np.c
thr_sleepq.c
thr_spec.c
thr_spinlock.c
thr_stack.c libthr: extract code to get main stack base and size into helpers 2022-09-16 23:24:12 +03:00
thr_suspend_np.c
thr_switch_np.c
thr_symbols.c libthr: Remove the DTV_OFFSET macro. 2021-12-09 13:15:38 -08:00
thr_syscalls.c libthr: wrap pdfork(2), same as fork(2). 2021-01-11 22:59:52 +02:00
thr_umtx.c
thr_umtx.h
thr_yield.c