diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-10-28 01:08:55 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-10-28 01:08:55 +0000 |
commit | ad3371fbac6896adc4820434676f35bd44a24cf8 (patch) | |
tree | 114d0b6de6e6bd4d52ae386bd4bd1328c9fc56d5 /nptl/sysdeps/unix/sysv/linux/unregister-atfork.c | |
parent | 666aa0201b5e68d13d24d7e9151c7d548d5cbbda (diff) | |
download | glibc-ad3371fbac6896adc4820434676f35bd44a24cf8.tar.gz |
[BZ #5208]
2007-10-23 Andreas Jaeger <aj@suse.de>
[BZ #5208]
* sysdeps/unix/sysv/linux/readahead.c (__readahead): Use
__LONG_LONG_PAIR to handle little endian byte order.
Suggested by abhishekrai@google.com
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/unregister-atfork.c')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/unregister-atfork.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c b/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c index 56a4f149e1..c738acd0c3 100644 --- a/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c +++ b/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c @@ -67,10 +67,21 @@ __unregister_atfork (dso_handle) It's a single linked list so readers are. */ do { + again: if (runp->dso_handle == dso_handle) { if (lastp == NULL) - __fork_handlers = runp->next; + { + /* We have to use an atomic operation here because + __linkin_atfork also uses one. */ + if (catomic_compare_and_exchange_bool_acq (&__fork_handlers, + runp->next, runp) + != 0) + { + runp = __fork_handlers; + goto again; + } + } else lastp->next = runp->next; |