summaryrefslogtreecommitdiff
path: root/nptl/pthread_getattr_np.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-22 19:54:06 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-22 19:54:06 +0000
commit61645263d4b3c72c9a33659a0fcabe1dd2814a98 (patch)
tree365a2e35feaf968b8d701d88bf477453fa47a35e /nptl/pthread_getattr_np.c
parent9708780004abee24d2c49fffe670820e36029377 (diff)
Update.
2004-03-22 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c (__getpagesize): Avoid warning about writing into read-only memory. * string/Makefile (routines): Add xpg-strerror. * string/string.h (strerror_r): If __USE_XOPEN2K but not __USE_GNU, redirect strerror_r to __xpg_strerror_r. * string/Versions (libc): Add __xpg_strerror_r@@GLIBC_2.3.4. * sysdeps/generic/xpg-strerror.c: New file. * sysdeps/mach/xpg-strerror.c: New file.
Diffstat (limited to 'nptl/pthread_getattr_np.c')
-rw-r--r--nptl/pthread_getattr_np.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
index df11b1ff1d..d0c2c8b880 100644
--- a/nptl/pthread_getattr_np.c
+++ b/nptl/pthread_getattr_np.c
@@ -135,16 +135,18 @@ pthread_getattr_np (thread_id, attr)
if (ret == 0)
{
- size_t size = 32;
+ size_t size = 16;
cpu_set_t *cpuset = NULL;
do
{
+ size <<= 1;
+
void *newp = realloc (cpuset, size);
if (newp == NULL)
{
- free (cpuset);
ret = ENOMEM;
+ break;
}
cpuset = (cpu_set_t *) newp;