From 641ecb07533e85211b6abce334c85967f3f90209 Mon Sep 17 00:00:00 2001 From: Mark Geisert Date: Sun, 23 Jun 2019 14:51:06 -0700 Subject: 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. --- winsup/cygwin/common.din | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'winsup/cygwin/common.din') diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din index 68b95d470..81292ab7b 100644 --- a/winsup/cygwin/common.din +++ b/winsup/cygwin/common.din @@ -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 -- cgit v1.2.3