Cygwin: Implement sched_[gs]etaffinity()

This patch set implements the Linux syscalls sched_getaffinity,
sched_setaffinity, pthread_getaffinity_np, and pthread_setaffinity_np.
Linux has a straightforward view of the cpu sets used in affinity masks.
They are simply long (1024-bit) bit masks.  This code emulates that view
while internally dealing with Windows' distribution of available CPUs among
processor groups.
This commit is contained in:
Mark Geisert
2019-06-23 14:51:06 -07:00
committed by Corinna Vinschen
parent d54edfdf81
commit 641ecb0753
11 changed files with 389 additions and 5 deletions

View File

@@ -1084,6 +1084,7 @@ pthread_create SIGFE
pthread_detach SIGFE
pthread_equal SIGFE
pthread_exit SIGFE
pthread_getaffinity_np SIGFE
pthread_getattr_np SIGFE
pthread_getconcurrency SIGFE
pthread_getcpuclockid SIGFE
@@ -1128,6 +1129,7 @@ pthread_rwlockattr_getpshared SIGFE
pthread_rwlockattr_init SIGFE
pthread_rwlockattr_setpshared SIGFE
pthread_self SIGFE
pthread_setaffinity_np SIGFE
pthread_setcancelstate SIGFE
pthread_setcanceltype SIGFE
pthread_setconcurrency SIGFE
@@ -1248,10 +1250,12 @@ scandirat SIGFE
scanf SIGFE
sched_get_priority_max SIGFE
sched_get_priority_min SIGFE
sched_getaffinity SIGFE
sched_getcpu SIGFE
sched_getparam SIGFE
sched_getscheduler NOSIGFE
sched_rr_get_interval SIGFE
sched_setaffinity SIGFE
sched_setparam SIGFE
sched_setscheduler SIGFE
sched_yield SIGFE