@@ -1,3 +1,11 @@
+2016-08-20 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * malloc/malloc.c (main_arena): Use MUTEX_INITIALIZER instead of
+ _LIBC_LOCK_INITIALIZER.
+ * sysdeps/nptl/malloc-machine.h (MUTEX_INITIALIZER): Define.
+ * sysdeps/mach/hurd/malloc-machine.h (MUTEX_INITIALIZER): Comment
+ about macro definition coming from cthreads.h.
+
2016-08-16 Joseph Myers <joseph@codesourcery.com>
* soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_E):
@@ -1687,7 +1687,7 @@ struct malloc_par
static struct malloc_state main_arena =
{
- .mutex = _LIBC_LOCK_INITIALIZER,
+ .mutex = MUTEX_INITIALIZER,
.next = &main_arena,
.attached_threads = 1
};
@@ -41,6 +41,8 @@
#define mutex_trylock(m) (!__mutex_trylock(m))
+/* MUTEX_INITIALIZER already defined by cthreads.h. */
+
/* No we're *not* using pthreads. */
#define __pthread_initialize ((void (*)(void))0)
@@ -29,6 +29,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
#include <sysdeps/generic/malloc-machine.h>