about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/fork.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-05-09 03:17:42 +0000
committerUlrich Drepper <drepper@redhat.com>2003-05-09 03:17:42 +0000
commit92d83c725e09dbc76acfedc1cf85a01f9f54452d (patch)
tree039357dd8df0ad0c249d28e098e921ff15fb1eb0 /nptl/sysdeps/unix/sysv/linux/fork.h
parent29b095a1561f866b995b23621d1e2ee78e473dc4 (diff)
downloadglibc-92d83c725e09dbc76acfedc1cf85a01f9f54452d.tar.gz
glibc-92d83c725e09dbc76acfedc1cf85a01f9f54452d.tar.xz
glibc-92d83c725e09dbc76acfedc1cf85a01f9f54452d.zip
Update.
2003-05-08  Ulrich Drepper  <drepper@redhat.com>

	* malloc/thread-m.h: Remove special handling of thread_atfork if
	HAVE_register_atfork_malloc is defined.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/fork.h')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/fork.h26
1 files changed, 10 insertions, 16 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/fork.h b/nptl/sysdeps/unix/sysv/linux/fork.h
index e59ae87964..bcdf6217c1 100644
--- a/nptl/sysdeps/unix/sysv/linux/fork.h
+++ b/nptl/sysdeps/unix/sysv/linux/fork.h
@@ -17,7 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#include <list.h>
 #include <lowlevellock.h>
 
 /* The fork generation counter, defined in libpthread.  */
@@ -26,23 +25,24 @@ extern unsigned long int __fork_generation attribute_hidden;
 /* Pointer to the fork generation counter in the thread library.  */
 extern unsigned long int *__fork_generation_pointer attribute_hidden;
 
-/* Lock to protect handling of fork handlers.  */
+/* Lock to protect allocation and deallocation of fork handlers.  */
 extern lll_lock_t __fork_lock attribute_hidden;
 
-/* Lists of registered fork handlers.  */
-extern list_t __fork_prepare_list attribute_hidden;
-extern list_t __fork_parent_list attribute_hidden;
-extern list_t __fork_child_list attribute_hidden;
-
-
 /* Elements of the fork handler lists.  */
 struct fork_handler
 {
-  list_t list;
-  void (*handler) (void);
+  struct fork_handler *next;
+  void (*prepare_handler) (void);
+  void (*parent_handler) (void);
+  void (*child_handler) (void);
   void *dso_handle;
+  unsigned int refcntr;
+  int need_signal;
 };
 
+/* The single linked list of all currently registered for handlers.  */
+extern struct fork_handler *__fork_handlers;
+
 
 /* Function to call to unregister fork handlers.  */
 extern void __unregister_atfork (void *dso_handle) attribute_hidden;
@@ -54,9 +54,3 @@ extern int __register_atfork (void (*__prepare) (void),
 			      void (*__parent) (void),
 			      void (*__child) (void),
 			      void *dso_handle);
-
-extern void __register_atfork_malloc (void (*prepare) (void),
-				      void (*parent) (void),
-				      void (*child) (void),
-				      void *dso_handle) attribute_hidden;
-#define HAVE_register_atfork_malloc