diff options
author | Florian Weimer <fweimer@redhat.com> | 2015-11-24 16:37:15 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2015-11-24 16:37:15 +0100 |
commit | 400e12265d99964f8445bb6d717321eb73152cc5 (patch) | |
tree | 6473ade0eedb0503e4716ff79d50dc091a63e6ab /sysdeps/nptl | |
parent | a61a1a2576e82c7a0c5de620b2eda755edeffb88 (diff) | |
download | glibc-400e12265d99964f8445bb6d717321eb73152cc5.zip glibc-400e12265d99964f8445bb6d717321eb73152cc5.tar.gz glibc-400e12265d99964f8445bb6d717321eb73152cc5.tar.bz2 |
Replace MUTEX_INITIALIZER with _LIBC_LOCK_INITIALIZER in generic code
* sysdeps/mach/hurd/libc-lock.h (_LIBC_LOCK_INITIALIZER): Define.
(__libc_lock_define_initialized): Use it.
* sysdeps/nptl/libc-lockP.h (_LIBC_LOCK_INITIALIZER): Define.
* malloc/arena.c (list_lock): Use _LIBC_LOCK_INITIALIZER.
* malloc/malloc.c (main_arena): Likewise.
* sysdeps/generic/malloc-machine.h (MUTEX_INITIALIZER): Remove.
* sysdeps/nptl/malloc-machine.h (MUTEX_INITIALIZER): Remove.
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r-- | sysdeps/nptl/libc-lockP.h | 1 | ||||
-rw-r--r-- | sysdeps/nptl/malloc-machine.h | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h index 29494fd..3881b45 100644 --- a/sysdeps/nptl/libc-lockP.h +++ b/sysdeps/nptl/libc-lockP.h @@ -75,6 +75,7 @@ typedef pthread_key_t __libc_key_t; initialized locks must be set to one due to the lack of normal atomic operations.) */ +#define _LIBC_LOCK_INITIALIZER LLL_LOCK_INITIALIZER #if IS_IN (libc) || IS_IN (libpthread) # if LLL_LOCK_INITIALIZER == 0 # define __libc_lock_define_initialized(CLASS,NAME) \ diff --git a/sysdeps/nptl/malloc-machine.h b/sysdeps/nptl/malloc-machine.h index 8dea606..d46a9d9 100644 --- a/sysdeps/nptl/malloc-machine.h +++ b/sysdeps/nptl/malloc-machine.h @@ -31,7 +31,6 @@ __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__)); |