Files
haiku-beta6/headers/private/kernel
Augustin Cavalier c12c2d4488 kernel/thread: Fix behavior of {get|set}_thread_affinity.
* Handle threads without masks: this means they can run on any CPU.

 * Return only enabled CPUs from get_thread_affinity.

 * Clear the user mask's extra bits.

 * Allow masks with more CPUs set than are active, same as Linux,
   but disallow masks with no intersection with the active CPUs.

 * If setting to all enabled CPUs, clear the mask, so that if
   more CPUs are enabled in the future, this can run on them too.

 * Add permissions checks.

Fixes #20251.
(cherry picked from commit f46b3483057b149179dda7abdcc2dde38994a8cc)

Change-Id: Ib8649cb0a252fc8d9cfca691c2e03748561db741
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11529
Reviewed-by: waddlesplash <[email protected]>
2026-08-13 18:57:26 +00:00
..
2025-11-15 22:30:45 +00:00
2024-09-02 14:16:40 -04:00
2026-03-23 23:01:26 -04:00
2025-07-07 15:20:18 +00:00