From ad3371fbac6896adc4820434676f35bd44a24cf8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 28 Oct 2007 01:08:55 +0000 Subject: [BZ #5208] 2007-10-23 Andreas Jaeger [BZ #5208] * sysdeps/unix/sysv/linux/readahead.c (__readahead): Use __LONG_LONG_PAIR to handle little endian byte order. Suggested by abhishekrai@google.com --- nptl/sysdeps/pthread/malloc-machine.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'nptl/sysdeps/pthread') diff --git a/nptl/sysdeps/pthread/malloc-machine.h b/nptl/sysdeps/pthread/malloc-machine.h index efab230aa8..33a3d20531 100644 --- a/nptl/sysdeps/pthread/malloc-machine.h +++ b/nptl/sysdeps/pthread/malloc-machine.h @@ -1,6 +1,6 @@ /* Basic platform-independent macro definitions for mutexes, thread-specific data and parameters for malloc. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -38,13 +38,24 @@ extern void *__dso_handle __attribute__ ((__weak__)); #include +#define ATFORK_MEM static struct fork_handler atfork_mem + #ifdef SHARED # define thread_atfork(prepare, parent, child) \ - __register_atfork (prepare, parent, child, __dso_handle) + atfork_mem.prepare_handler = prepare; \ + atfork_mem.parent_handler = parent; \ + atfork_mem.child_handler = child; \ + atfork_mem.dso_handle = __dso_handle; \ + atfork_mem.refcntr = 1; \ + __linkin_atfork (&atfork_mem) #else # define thread_atfork(prepare, parent, child) \ - __register_atfork (prepare, parent, child, \ - &__dso_handle == NULL ? NULL : __dso_handle) + atfork_mem.prepare_handler = prepare; \ + atfork_mem.parent_handler = parent; \ + atfork_mem.child_handler = child; \ + atfork_mem.dso_handle = &__dso_handle == NULL ? NULL : __dso_handle; \ + atfork_mem.refcntr = 1; \ + __linkin_atfork (&atfork_mem) #endif /* thread specific data for glibc */ -- cgit 1.4.1