1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

malloc: Manual part of conversion to __libc_lock

This removes the old mutex_t-related definitions from malloc-machine.h,
too.
This commit is contained in:
Florian Weimer
2016-09-21 16:28:08 +02:00
parent be728303a6
commit cbb47fa1c6
5 changed files with 20 additions and 33 deletions

View File

@ -23,27 +23,6 @@
#include <atomic.h>
#include <libc-lock.h>
/* Assume hurd, with cthreads */
/* Cthreads `mutex_t' is a pointer to a mutex, and malloc wants just the
mutex itself. */
#undef mutex_t
#define mutex_t struct mutex
#undef mutex_init
#define mutex_init(m) ({ __mutex_init(m); 0; })
#undef mutex_lock
#define mutex_lock(m) ({ __mutex_lock(m); 0; })
#undef mutex_unlock
#define mutex_unlock(m) ({ __mutex_unlock(m); 0; })
#define mutex_trylock(m) (!__mutex_trylock(m))
/* No we're *not* using pthreads. */
#define __pthread_initialize ((void (*)(void))0)
/* madvise is a stub on Hurd, so don't bother calling it. */
#include <sys/mman.h>