about summary refs log tree commit diff
path: root/malloc/thread-m.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-05 09:36:56 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-05 09:36:56 +0000
commit54e0138f7f9ff016d3cb6b2cb02a3ca2a727b6e7 (patch)
tree80626ba7cdf1e2b1bbb1d1ef3481b62f9a85b17e /malloc/thread-m.h
parentb22d701bb72b928526efff83c019b912f469af72 (diff)
downloadglibc-54e0138f7f9ff016d3cb6b2cb02a3ca2a727b6e7.tar.gz
glibc-54e0138f7f9ff016d3cb6b2cb02a3ca2a727b6e7.tar.xz
glibc-54e0138f7f9ff016d3cb6b2cb02a3ca2a727b6e7.zip
Update.
2003-04-05  Ulrich Drepper  <drepper@redhat.com>

	* malloc/thread-m.h [PTHREAD_MUTEX_INITIALIZER]: If
	HAVE_register_atfork_malloc is defined use __register_atfork_malloc
	instead of __register_atfork.
Diffstat (limited to 'malloc/thread-m.h')
-rw-r--r--malloc/thread-m.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/malloc/thread-m.h b/malloc/thread-m.h
index d65ba913b2..71409ebc0e 100644
--- a/malloc/thread-m.h
+++ b/malloc/thread-m.h
@@ -1,6 +1,6 @@
 /* Basic platform-independent macro definitions for mutexes and
    thread-specific data.
-   Copyright (C) 1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
+   Copyright (C) 1996-1998,2000,2001,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
 
@@ -77,13 +77,24 @@ extern void *__dso_handle __attribute__ ((__weak__));
 
 #include <fork.h>
 
-#ifdef SHARED
-# define thread_atfork(prepare, parent, child) \
-   __register_atfork (prepare, parent, child, __dso_handle)
+#ifdef HAVE_register_atfork_malloc
+# ifdef SHARED
+#  define thread_atfork(prepare, parent, child) \
+   __register_atfork_malloc (prepare, parent, child, __dso_handle)
+# else
+#  define thread_atfork(prepare, parent, child) \
+   __register_atfork_malloc (prepare, parent, child,			      \
+			     &__dso_handle == NULL ? NULL : __dso_handle)
+# endif
 #else
-# define thread_atfork(prepare, parent, child) \
+# ifdef SHARED
+#  define thread_atfork(prepare, parent, child) \
+   __register_atfork (prepare, parent, child, __dso_handle)
+# else
+#  define thread_atfork(prepare, parent, child) \
    __register_atfork (prepare, parent, child,				      \
 		      &__dso_handle == NULL ? NULL : __dso_handle)
+# endif
 #endif
 
 #elif defined(MUTEX_INITIALIZER)