[PATCH v2] Fix return value of sched_getaffinity

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jun 26 09:16:00 GMT 2019


Hi Mark,

On Jun 26 01:14, Mark Geisert wrote:
> Have sched_getaffinity() interface like glibc's, and provide an
> undocumented internal interface __sched_getaffinity_sys() like the Linux
> kernel's sched_getaffinity() for benefit of taskset(1).
> 
> ---
>  newlib/libc/include/sched.h            |  1 +
>  winsup/cygwin/common.din               |  1 +
>  winsup/cygwin/include/cygwin/version.h |  2 +-
>  winsup/cygwin/sched.cc                 | 29 +++++++++++++++++---------
>  4 files changed, 22 insertions(+), 11 deletions(-)
> 
> diff --git a/newlib/libc/include/sched.h b/newlib/libc/include/sched.h
> index fc44209d6..bdd57d442 100644
> --- a/newlib/libc/include/sched.h
> +++ b/newlib/libc/include/sched.h
> @@ -111,6 +111,7 @@ typedef struct
>    __cpu_mask __bits[__CPU_GROUPMAX];
>  } cpu_set_t;
>  
  #ifdef __CYGWIN__
> +int __sched_getaffinity_sys (pid_t, size_t, cpu_set_t *);
  #endif

ideally outside the #if __GNU_VISIBLE bracketing.

The rest of the patch looks good.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20190626/39de0aab/attachment.sig>


More information about the Cygwin-patches mailing list