mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 10:22:41 +08:00
* sysdeps/unix/sysv/linux/bits/sched.h (__CPU_SET_S): Handle large
sets correctly. (__CPU_CLR_S): Likewise. (__CPU_ISSET_S): Likewise.
This commit is contained in:
parent
f6d87f13fb
commit
25a34eb737
@ -1,3 +1,10 @@
|
||||
2008-12-05 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* 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 <joseph@codesourcery.com>
|
||||
Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
|
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user