From 25a34eb737fa25391f8c6d2915fff80b218a1524 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 6 Dec 2008 05:40:29 +0000 Subject: [PATCH] * sysdeps/unix/sysv/linux/bits/sched.h (__CPU_SET_S): Handle large sets correctly. (__CPU_CLR_S): Likewise. (__CPU_ISSET_S): Likewise. --- ChangeLog | 7 +++++++ sysdeps/unix/sysv/linux/bits/sched.h | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab3454f96d..d02615b78e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-05 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/sched.h (__CPU_SET_S): Handle large + sets correctly. + (__CPU_CLR_S): Likewise. + (__CPU_ISSET_S): Likewise. + 2008-12-05 Joseph Myers Ulrich Drepper diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index 8f694d70c4..696b8ddf0a 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -140,17 +140,22 @@ typedef struct (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ - ? ((cpusetp)->__bits[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; })) + ? (((cpu_set_t *) (cpusetp))->__bits[__CPUELT (__cpu)] \ + |= __CPUMASK (__cpu)) \ + : 0; })) # define __CPU_CLR_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ - ? ((cpusetp)->__bits[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; })) + ? (((cpu_set_t *) (cpusetp))->__bits[__CPUELT (__cpu)] \ + &= ~__CPUMASK (__cpu)) \ + : 0; })) # define __CPU_ISSET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ - ? (((cpusetp)->__bits[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 \ + ? ((((cpu_set_t *) (cpusetp))->__bits[__CPUELT (__cpu)] \ + & __CPUMASK (__cpu))) != 0 \ : 0; })) # define __CPU_COUNT_S(setsize, cpusetp) \