about summary refs log tree commit diff
path: root/nptl
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
parent9708780004abee24d2c49fffe670820e36029377 (diff)
downloadglibc-61645263d4b3c72c9a33659a0fcabe1dd2814a98.tar.gz
glibc-61645263d4b3c72c9a33659a0fcabe1dd2814a98.tar.xz
glibc-61645263d4b3c72c9a33659a0fcabe1dd2814a98.zip
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')
-rw-r--r--nptl/ChangeLog7
-rw-r--r--nptl/pthread_getattr_np.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index efea03e6a2..243ad921b8 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-22  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/unix/sysv/linux/pthread_getaffinity.c
+	(__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
+	* pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
+	If realloc fails, break out of the loop.
+
 2004-03-20  Andreas Jaeger  <aj@suse.de>
 
 	* sysdeps/unix/sysv/linux/pthread_setaffinity.c
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;