Commit Graph

4 Commits

Author SHA1 Message Date
Mark Geisert a083a4f266 Cygwin: fix CPU_SET macro visibility
The CPU_SET macros defined in Cygwin's include/sys/cpuset.h must not
be visible in an application's namespace unless _GNU_SOURCE has been
#defined.  Internally this means wrapping them in #if __GNU_VISIBLE.
2019-09-14 11:31:17 -04:00
Mark Geisert 362b98b49a Cygwin: Implement CPU_SET(3) macros
This patch supplies an implementation of the CPU_SET(3) processor
affinity macros as documented on the relevant Linux man page.

There is a mostly superset implementation of cpusets under newlib's
libc/sys/RTEMS/include/sys that has Linux and FreeBSD compatibility
and is built on top of FreeBSD bitsets.  This Cygwin implementation
and the RTEMS one could be combined if desired at some future point.
2019-08-05 13:22:04 +02:00
Mark Geisert fff17ad73f Cygwin: Fix return value of sched_getaffinity
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).
2019-06-28 17:10:39 +02:00
Corinna Vinschen 383e19ca55 sched: Move Cygwin cpuset definitions into Cygwin-specific header
This avoids build breakage on RTEMS.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-06-27 20:19:31 +02:00