diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-04-04 18:51:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-04-04 18:51:36 +0000 |
commit | b4afdd0651ac787cb19423835a95d1972cb49d24 (patch) | |
tree | 1321ef4484969ce93fd4d26406a006334ad47237 /posix/sched_cpucount.c | |
parent | eab1bdfb8ef2902e7b68352d6ce1b5d603597e36 (diff) | |
download | glibc-b4afdd0651ac787cb19423835a95d1972cb49d24.tar glibc-b4afdd0651ac787cb19423835a95d1972cb49d24.tar.gz glibc-b4afdd0651ac787cb19423835a95d1972cb49d24.tar.bz2 glibc-b4afdd0651ac787cb19423835a95d1972cb49d24.zip |
* bits/sched.h: Define __CPU_COUNT. Declare __sched_cpucount.
* sysdeps/unix/sysv/linux/bits/sched.h: Likewise.
* posix/sched.h: Define CPU_COUNT.
Diffstat (limited to 'posix/sched_cpucount.c')
-rw-r--r-- | posix/sched_cpucount.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/sched_cpucount.c b/posix/sched_cpucount.c index 8404e8f3c0..d7f6b7b49f 100644 --- a/posix/sched_cpucount.c +++ b/posix/sched_cpucount.c @@ -21,10 +21,10 @@ int -__sched_cpucount (cpu_set_t *setp) +__sched_cpucount (size_t setsize, cpu_set_t *setp) { int s = 0; - for (unsigned int j = 0; j < __CPU_SETSIZE / __NCPUBITS; ++j) + for (unsigned int j = 0; j < setsize / sizeof (__cpu_mask); ++j) { __cpu_mask l = setp->__bits[j]; if (l == 0) |