aboutsummaryrefslogtreecommitdiff
path: root/posix/sched_cpucount.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-04-04 18:51:36 +0000
committerUlrich Drepper <drepper@redhat.com>2007-04-04 18:51:36 +0000
commitb4afdd0651ac787cb19423835a95d1972cb49d24 (patch)
tree1321ef4484969ce93fd4d26406a006334ad47237 /posix/sched_cpucount.c
parenteab1bdfb8ef2902e7b68352d6ce1b5d603597e36 (diff)
downloadglibc-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.c4
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)