Re: Cygwin: Implement sched_[gs]etaffinity() commit breaks RTEMS port

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Jun 28 03:17, Mark Geisert wrote:
> On Fri, 28 Jun 2019, Sebastian Huber wrote:
> > On 28/06/2019 10:48, Mark Geisert wrote:
> > > On Thu, 27 Jun 2019, Corinna Vinschen wrote:
> > > > On Jun 27 08:28, Sebastian Huber wrote:
> > > > > On 26/06/2019 15:12, Corinna Vinschen wrote:
> > > > > > On Jun 26 13:05, Sebastian Huber wrote:
> > > > > > > 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()
> > > > > > > > > [...]
> > > > > > > > > breaks the RTEMS port:
> > > > > > > > > [...]
> > > > > > > > Looks like Cygwin has to define its own sys/cpuset.h included via
> > > > > > > > sys/_pthreadtypes.h.
> > > > > > > 
> > > [...]
> > > Hi folks,
> > > I was trying to minimize update scope while implementing the
> > > affinity calls from Linux for Cygwin.  I noticed that taskset(1),
> > > from the util-linux package, supplies its own CPU_SET implementation
> > > (copied from glibc) so I decided to not supply one for Cygwin but
> > > let taskset use its own.  I felt we could add CPU_SET to Cygwin when
> > > necessary, later.
> > > 
> > > The macro #defines I added to sched.h are those needed by Linux
> > > CPU_SET regardless of how it gets defined.  I worry about trying to
> > > use a FreeBSD based CPU_SET -- just from unfamiliarity.
> > 
> > The RTEMS <sys/cpuset.h> implements the Linux and FreeBSD APIs. In case
> > of conflict (and there are conflicts, the libc developers should talk
> > more with each other) we choose the Linux variant.
> 
> O.K. Thank you for the background.
> 
> > > [...]
> > > I don't see how the include linkage through _pthreadtypes.h works
> > > though. How does a user app including <sched.h> get <sys/cpuset.h>
> > > pulled in?
> > 
> > It is included via <sys/types.h> -> <sys/_pthreadtypes.h> -> <sys/cpuset.h>.
> 
> Great!  Thank you Sebastian.
> 
> Corinna, I'm able to build Cygwin 64- and 32-bit with your updates, and to
> build util-linux as well.  I have a resulting working taskset executable.
> 
> It was not necessary to implement the CPU_SET functionality via any of the
> possible ways because taskset supplies its own if it can't find one.
> 
> We can call it a day, with review and release of the current patch state.
> If you think it's worthwhile to implement CPU_SET on Cygwin now, rather than
> later, I can look into it but it's not strictly necessary at this time.
> 
> Let me know what you think when you have a chance.

I'll push my patch, but it would be nice if we could provide the
definitions from http://man7.org/linux/man-pages/man3/CPU_SET.3.html as
well.


Thanks,
Corinna
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl0WILUACgkQ9TYGna5E
T6BAcQ/9Ezj+9mt2QFj0jQGy0dNRv3Xo259rNUm/LdjyMcDZvJSdUOT8Qt0wFCW8
bPq7+lhu2/MpZqXk7pkrGu8Fn0u5eyNYO4LoH5YmNIOdEC50lg8r1InUhLcZcFQz
udXFoqgdBNiSdeKuDoQVAiE9+u7OkoFRMjPvfHatxTQYJ2z1u8ntHMPnTga5eadG
Swt9MSX2PF9Cop1lWGU96aeW8nLR6+mM1CGh69F+J6YHP+A581FR8MJi/B5urkYe
eyYx/tualo49ybGPO4e4WTLT9+Uv5jrzHmIp9Ca1aqBd405AUrmmwc3F3xHlrK2a
DPXTPcXOMAIbxmNT74IahiXyMciVf0VvVW/6d4FsMTlZH1+c8PhVV2Lrgs6O/Vga
CnqZbp871VXYUuBmfXeEn4AVCckq9PvbQQI1JtwHeiXPPUoLRxzPHpvZOsEJn/Qi
mJkSJcCdeQ9FKw3JDI7vinAS1sQwK3VALVxMu1bqeGBPHtITPJaXDK7ccMHT1nCz
QX4TwYoRclTf6xQrHFgRFhd2zppBS8vPLJhl103aOsWrkNGoxVbsXIDh5DoEOMIy
65t1V4DepjSjm4T40fDMDB1G+Fwz1ckOp8D8VMtkD+SyrZR28T+QqTm1iA/KZEue
dMn1n4lFHwv+/+BY/1O+Se67gY4A4UKanDJwJwOMtxK3EmliOeM=
=3DYG
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.