about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-12-06 05:40:29 +0000
committerUlrich Drepper <drepper@redhat.com>2008-12-06 05:40:29 +0000
commit25a34eb737fa25391f8c6d2915fff80b218a1524 (patch)
tree6a07b2e790cce1de01b21e225418f3e22c26ad96 /sysdeps/unix/sysv
parentf6d87f13fb90ef9d11d12a77b65a8a58428bd161 (diff)
downloadglibc-25a34eb737fa25391f8c6d2915fff80b218a1524.tar.gz
glibc-25a34eb737fa25391f8c6d2915fff80b218a1524.tar.xz
glibc-25a34eb737fa25391f8c6d2915fff80b218a1524.zip
* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_SET_S): Handle large
	sets correctly.
	(__CPU_CLR_S): Likewise.
	(__CPU_ISSET_S): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/bits/sched.h11
1 files changed, 8 insertions, 3 deletions
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) \