about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-12-01 21:08:31 +0000
committerUlrich Drepper <drepper@redhat.com>1999-12-01 21:08:31 +0000
commit4a0f14bc365e9ed5fd7da31c740935273e69a0b7 (patch)
tree873d4da548d7f88cb741103173b89e9de54ccb10
parentf0d8cfd73c91a95ac1faa6702e75bfa821d57e05 (diff)
downloadglibc-4a0f14bc365e9ed5fd7da31c740935273e69a0b7.tar.gz
glibc-4a0f14bc365e9ed5fd7da31c740935273e69a0b7.tar.xz
glibc-4a0f14bc365e9ed5fd7da31c740935273e69a0b7.zip
Update.
	* malloc/set-freeres.c: Really use already_called variable.
-rw-r--r--ChangeLog2
-rw-r--r--linuxthreads_db/ChangeLog5
-rw-r--r--malloc/set-freeres.c5
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ae16efb687..3f16a0dbef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
 
+	* malloc/set-freeres.c: Really use already_called variable.
+
 	* libio/iosetbuffer.c: Use _IO_WSETBUF instead of constructing
 	function call directly.
 	* libio/iosetvbuf.c: Likewise.
diff --git a/linuxthreads_db/ChangeLog b/linuxthreads_db/ChangeLog
index bb5b019f39..e6216274da 100644
--- a/linuxthreads_db/ChangeLog
+++ b/linuxthreads_db/ChangeLog
@@ -1,3 +1,8 @@
+1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
+
+	* proc_service.h: Add ps_pstop, ps_pcontinue, ps_lstop, and
+	ps_lcontinue prototypes.
+
 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
 
 	* Makefile: Correct dependency for shared object.
diff --git a/malloc/set-freeres.c b/malloc/set-freeres.c
index e73da87bf7..814bc4a55e 100644
--- a/malloc/set-freeres.c
+++ b/malloc/set-freeres.c
@@ -16,6 +16,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <atomicity.h>
 #include <stdlib.h>
 #include <set-hooks.h>
 
@@ -26,8 +27,8 @@ __libc_freeres (void)
 {
   /* This function might be called from different places.  So better
      protect for multiple executions since these are fatal.  */
-  static int already_called;
+  static long int already_called;
 
-  if (!already_called)
+  if (compare_and_swap (&already_called, 0, 1))
     RUN_HOOK (__libc_subfreeres, ());
 }