25 #ifndef _SPROC_MALLOC_MACHINE_H
26 #define _SPROC_MALLOC_MACHINE_H
29 #include <sys/types.h>
30 #include <sys/prctl.h>
31 #include <abi_mutex.h>
33 typedef abilock_t mutex_t;
35 #define MUTEX_INITIALIZER { 0 }
36 #define mutex_init(m) init_lock(m)
37 #define mutex_lock(m) (spin_lock(m), 0)
38 #define mutex_trylock(m) acquire_lock(m)
39 #define mutex_unlock(m) release_lock(m)
41 typedef int tsd_key_t;
43 #define tsd_key_create(key, destr) ((*key) = tsd_key_next++)
44 #define tsd_setspecific(key, data) (((void **)(&PRDA->usr_prda))[key] = data)
45 #define tsd_getspecific(key, vptr) (vptr = ((void **)(&PRDA->usr_prda))[key])
47 #define thread_atfork(prepare, parent, child) do {} while(0)
49 #include <sysdeps/generic/malloc-machine.h>