This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sched_getaffinity() fails with -EINVAL
- From: Ulrich Drepper <drepper at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 18 Feb 2010 10:22:29 -0800
- Subject: Re: [PATCH] sched_getaffinity() fails with -EINVAL
- References: <4B7D30C6.8060702@in.ibm.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/18/2010 04:21 AM, Sharyathi Nagesh wrote:
> We are observing that ltp test case getcpu01.c is failing in some of
> the machines. In the test case: system call to sched_getaffinity()
> fails. Linux kernel is giving EINVAL on call to sched_getaffinity().
You don't understand the concept of binary compatibility, do you? You
cannot change the size of a type.
It is unfortunate that the type isn't large enough but it's what it is.
The size was chosen based on what the kernel people said at that time.
Regardless, even a larger number doesn't guarantee it'll work in future.
All code will have to use the dynamically sized CPU sets. Use the *_S
macros to handle them.
- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkt9hWUACgkQ2ijCOnn/RHQqZgCgpLmM2IaConFGN1/SOGgYrZ29
AhwAn198xWBHJjZM1cezaPbUZ7g50z9j
=oXTP
-----END PGP SIGNATURE-----