kernel: add syscalls for thread affinity

scheduler modes adapted to take into account the thread affinity mask.
when no cpu in the affinity mask is enabled, the mask is ignored.

Change-Id: I577737441ab073941a4c5e06f94f7825cffdc2c4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7674
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Jérôme Duval
2024-06-10 16:34:25 +00:00
committed by waddlesplash
parent 1dde4c4b94
commit f7a85eea15
15 changed files with 233 additions and 49 deletions
+2
View File
@@ -197,6 +197,8 @@ extern status_t _kern_get_team_usage_info(team_id team, int32 who,
extern status_t _kern_get_extended_team_info(team_id teamID, uint32 flags,
void* buffer, size_t size, size_t* _sizeNeeded);
extern int _kern_get_cpu();
extern status_t _kern_get_thread_affinity(thread_id id, void* userMask, size_t size);
extern status_t _kern_set_thread_affinity(thread_id id, const void* userMask, size_t size);
extern status_t _kern_start_watching_system(int32 object, uint32 flags,
port_id port, int32 token);