Re: Cygwin: Implement sched_[gs]etaffinity() commit breaks RTEMS port
Sebastian Huber <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On 26/06/2019 11:37, Corinna Vinschen wrote: > On Jun 26 10:24, Sebastian Huber wrote: >> Hello, >> >> the following commit: >> >> commit 641ecb07533e85211b6abce334c85967f3f90209 >> Author: Mark Geisert<[email protected]> >> Date: Sun Jun 23 14:51:06 2019 -0700 >> >> 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. >> >> breaks the RTEMS port: >> >> In file included from /usr/home/user/rtems-source-builder/rtems/build/aarch64-rtems6-gcc-55a600a6ce9-newlib-09e2ec87e-x86_64-freebsd12.0-1/gnu-mirror-gcc-55a600a6ce9/newlib/libc/include/pthread.h:31, >> from ./gthr-default.h:31, >> from ../../../gnu-mirror-gcc-55a600a6ce9/libgcc/gthr.h:148, >> from >> ../../../gnu-mirror-gcc-55a600a6ce9/libgcc/emutls.c:31: >> /usr/home/user/rtems-source-builder/rtems/build/aarch64-rtems6-gcc-55a600a6ce9-newlib-09e2ec87e-x86_64-freebsd12.0-1/gnu-mirror-gcc-55a600a6ce9/newlib/libc/include/sched.h:112:3: >> error: conflicting types for 'cpu_set_t' >> 112 | } cpu_set_t; >> | ^~~~~~~~~ >> ../../../gnu-mirror-gcc-55a600a6ce9/libgcc/../newlib/libc/sys/rtems/include/sys/cpuset.h:67:18: >> note: previous declaration of 'cpu_set_t' was here >> 67 | typedef cpuset_t cpu_set_t; >> | ^~~~~~~~~ > Looks like Cygwin has to define its own sys/cpuset.h included via > sys/_pthreadtypes.h. Yes, something like this. The RTEMS <sys/cpuset.h> is based on the FreeBSD implementation and should be compatible to the Linux API. Maybe it can move out of the RTEMS area into the global Newlib area. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : [email protected] PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.