diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-03-03 22:02:13 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-03-03 22:02:13 +0000 |
commit | 4f6f0a8fcff3219a19e860f0c4037d9e5646042c (patch) | |
tree | e3762b7a1738b04c266852eee550eddc5a96aef5 /nptl | |
parent | be095ffaf426d462028b836432ef3ba32d45e3a5 (diff) | |
download | glibc-4f6f0a8fcff3219a19e860f0c4037d9e5646042c.tar.gz glibc-4f6f0a8fcff3219a19e860f0c4037d9e5646042c.tar.xz glibc-4f6f0a8fcff3219a19e860f0c4037d9e5646042c.zip |
Update.
2003-03-03 Ulrich Drepper <drepper@redhat.com> * include/sched.h (__clone2): Use ... instead of adding all the new parameters.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 8 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c | 8 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/register-atfork.c | 8 |
3 files changed, 19 insertions, 5 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 740d6ff1f8..98d312cf88 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,11 @@ +2003-03-03 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/unix/sysv/linux/libc_pthread_init.c + (__pthread_child_handler): Renamed from pthread_child_handler, + exported, and marked hidden. Change all users. + * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not + free __pthread_child_handler from child list. + 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com> * atomic.h (atomic_exchange_and_add): Return newval, not oldval. diff --git a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c index fdda78bc20..06cca367b3 100644 --- a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c +++ b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -27,7 +27,7 @@ #include <bits/libc-lock.h> -static struct fork_handler pthread_child_handler; +struct fork_handler __pthread_child_handler attribute_hidden; void @@ -40,10 +40,10 @@ __libc_pthread_init (ptr, reclaim, functions) __fork_generation_pointer = ptr; /* Called by a child after fork. */ - pthread_child_handler.handler = reclaim; + __pthread_child_handler.handler = reclaim; /* The fork handler needed by libpthread. */ - list_add_tail (&pthread_child_handler.list, &__fork_child_list); + list_add_tail (&__pthread_child_handler.list, &__fork_child_list); #ifdef SHARED /* We copy the content of the variable pointed to by the FUNCTIONS diff --git a/nptl/sysdeps/unix/sysv/linux/register-atfork.c b/nptl/sysdeps/unix/sysv/linux/register-atfork.c index 7047d6a72a..2f63c781ab 100644 --- a/nptl/sysdeps/unix/sysv/linux/register-atfork.c +++ b/nptl/sysdeps/unix/sysv/linux/register-atfork.c @@ -22,6 +22,10 @@ #include "fork.h" +/* Defined in libc_pthread_init.c. */ +extern struct fork_handler __pthread_child_handler attribute_hidden; + + int __register_atfork (prepare, parent, child, dso_handle) void (*prepare) (void); @@ -114,7 +118,9 @@ libc_freeres_fn (free_mem) { list_del (runp); - free (list_entry (runp, struct fork_handler, list)); + void *p = list_entry (runp, struct fork_handler, list); + if (p != (void *) &__pthread_child_handler) + free (p); } /* Release the lock. */ |