summaryrefslogtreecommitdiff
path: root/libc/malloc/arena.c
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-08-28 14:14:43 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-08-28 14:14:43 +0000
commit89a00bff19086cb0fe6b694dd82d485e3c732e4d (patch)
tree92a42478f401701889d5c5acf8a5f4324225f312 /libc/malloc/arena.c
parente7a9915190f0e2b940e4af9ad480cbe035a197d6 (diff)
downloadeglibc2-89a00bff19086cb0fe6b694dd82d485e3c732e4d.tar.gz
Merge changes between r20213 and r20391 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@20392 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/malloc/arena.c')
-rw-r--r--libc/malloc/arena.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libc/malloc/arena.c b/libc/malloc/arena.c
index 06bdd77d2..9e5e33202 100644
--- a/libc/malloc/arena.c
+++ b/libc/malloc/arena.c
@@ -141,6 +141,8 @@ int __malloc_initialized = -1;
/**************************************************************************/
+#ifndef NO_THREADS
+
/* atfork support. */
static __malloc_ptr_t (*save_malloc_hook) (size_t __size,
@@ -276,7 +278,7 @@ ptmalloc_unlock_all (void)
(void)mutex_unlock(&list_lock);
}
-#ifdef __linux__
+# ifdef __linux__
/* In NPTL, unlocking a mutex in the child process after a
fork() is currently unsafe, whereas re-initializing it is safe and
@@ -311,11 +313,13 @@ ptmalloc_unlock_all2 (void)
atfork_recursive_cntr = 0;
}
-#else
+# else
-#define ptmalloc_unlock_all2 ptmalloc_unlock_all
+# define ptmalloc_unlock_all2 ptmalloc_unlock_all
-#endif
+# endif
+
+#endif /* !NO_THREADS */
/* Initialization routine. */
#include <string.h>