diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-06-30 20:41:34 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-06-30 20:41:34 -0400 |
commit | 6f8326cacd08bf7d1966743086855fc36574bf74 (patch) | |
tree | 0e974e28ad3c04a712cfe18b2a33ad46ac0ba27f /nptl/nptl-init.c | |
parent | 89f654c57b3b9a6aee480e25e37f88f06c898901 (diff) | |
download | glibc-6f8326cacd08bf7d1966743086855fc36574bf74.tar.gz glibc-6f8326cacd08bf7d1966743086855fc36574bf74.tar.xz glibc-6f8326cacd08bf7d1966743086855fc36574bf74.zip |
Fix robust mutex handling after fork
Diffstat (limited to 'nptl/nptl-init.c')
-rw-r--r-- | nptl/nptl-init.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index 851bab2bf1..33492c1602 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2007, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 2002-2007, 2008, 2009, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -68,6 +68,13 @@ extern void __libc_setup_tls (size_t tcbsize, size_t tcbalign); #endif #ifdef SHARED +static +#else +extern +#endif +void __nptl_set_robust (struct pthread *); + +#ifdef SHARED static void nptl_freeres (void); @@ -130,7 +137,8 @@ static const struct pthread_functions pthread_functions = .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd, .ptr__nptl_setxid = __nptl_setxid, /* For now only the stack cache needs to be freed. */ - .ptr_freeres = nptl_freeres + .ptr_freeres = nptl_freeres, + .ptr_set_robust = __nptl_set_robust }; # define ptr_pthread_functions &pthread_functions #else @@ -147,7 +155,17 @@ nptl_freeres (void) __unwind_freeres (); __free_stacks (0); } + + +static #endif +void +__nptl_set_robust (struct pthread *self) +{ + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (set_robust_list, err, 2, &self->robust_head, + sizeof (struct robust_list_head)); +} /* For asynchronous cancellation we use a signal. This is the handler. */ |