aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2008-11-13 17:47:56 -0500
committerMichael Kerrisk <mtk.manpages@gmail.com>2008-11-25 20:53:58 -0500
commitb62e3548228be55c9b46f4b26f90a7065cd05090 (patch)
treebfb9947a20026a11d3e4f40b3508af1b46d4d16a /man3
parentd69305f69181ebed1bf207499d4a273bb88a0348 (diff)
downloadman-pages-b62e3548228be55c9b46f4b26f90a7065cd05090.tar.gz
CPU_SET.3: Document CPU_ALLOC()/CPU_ALLOC_SIZE() bug
These macros return twice what they should because of thinko in glibc 2.8 and earlier. The bug is fixed for glibc 2.9. http://sourceware.org/bugzilla/show_bug.cgi?id=7029 Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
-rw-r--r--man3/CPU_SET.317
1 files changed, 11 insertions, 6 deletions
diff --git a/man3/CPU_SET.3 b/man3/CPU_SET.3
index 90b85da79a..7046fde3de 100644
--- a/man3/CPU_SET.3
+++ b/man3/CPU_SET.3
@@ -177,12 +177,6 @@ in the range 0 to
Return the size in bytes of the CPU set that would be needed to
hold CPUs in the range 0 to
.IR num_cpus-1 .
-.\" FIXME . track this bug
-.\" Currently (glibc 2.8), CPU_ALLOC_SIZE() returns double the
-.\" value that it should. This also causes CPU_ALLOC() to allocate
-.\" twice as much memory as is required.
-.\" http://sourceware.org/bugzilla/show_bug.cgi?id=7029
-.\" Eventually, write this up in BUGS.
This macro provides the value that can be used for
.I setsize
in the
@@ -305,6 +299,17 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
.fi
+.SH BUGS
+On 32-bit platforms with glibc 2.8 and earlier,
+.BR CPU_ALLOC ()
+allocates twice as much space as is required, and
+.BR CPU_ALLOC_SIZE ()
+returns a value twice as large as it should.
+The only consequences for most programs is wasted space,
+and slightly less efficient operation of the macros that
+operate on dynamically allocated CPU sets.
+These bugs are fixed in glibc 2.9.
+.\" http://sourceware.org/bugzilla/show_bug.cgi?id=7029
.SH "SEE ALSO"
.BR sched_setaffinity (2),
.BR pthread_attr_setaffinity_np (3),