aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-10 21:47:36 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-10 21:47:36 -0400
commit02d46fc4b969e25e4ba0c54aa95fa98d7279bd05 (patch)
tree8d0fc5bfaeac42091551da91a1f992ff656f1f56 /nptl
parent22a89187139a9083ca73989bfd11597e0f85cb61 (diff)
downloadglibc-02d46fc4b969e25e4ba0c54aa95fa98d7279bd05.zip
glibc-02d46fc4b969e25e4ba0c54aa95fa98d7279bd05.tar.gz
glibc-02d46fc4b969e25e4ba0c54aa95fa98d7279bd05.tar.bz2
Simplify malloc initialization
Singificantly reduce the code needed at malloc initialization. In the process getpagesize is simplified by always initializing GLRO(dl_pagesize).
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog2
-rw-r--r--nptl/sysdeps/pthread/malloc-machine.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 56f4d1d..b343939 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,7 @@
2011-09-10 Ulrich Drepper <drepper@gmail.com>
+ * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
+
* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
!USE___THREAD.
* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
diff --git a/nptl/sysdeps/pthread/malloc-machine.h b/nptl/sysdeps/pthread/malloc-machine.h
index e99aaa7..73503ae 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, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2008, 2011 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
@@ -32,6 +32,7 @@ __libc_lock_define (typedef, mutex_t)
#define mutex_lock(m) __libc_lock_lock (*(m))
#define mutex_trylock(m) __libc_lock_trylock (*(m))
#define mutex_unlock(m) __libc_lock_unlock (*(m))
+#define MUTEX_INITIALIZER LLL_LOCK_INITIALIZER
/* This is defined by newer gcc version unique for each module. */
extern void *__dso_handle __attribute__ ((__weak__));