Back to index

glibc  2.9
Defines | Typedefs | Functions
malloc-machine.h File Reference
#include <atomic.h>
#include <bits/libc-lock.h>
#include <fork.h>
#include <bits/libc-tsd.h>
#include <sysdeps/generic/malloc-machine.h>

Go to the source code of this file.

Defines

#define mutex_init(m)   __libc_maybe_call2 (pthread_mutex_init, (m, NULL), (*(int *)(m) = 0))
#define mutex_lock(m)   __libc_maybe_call2 (pthread_mutex_lock, (m), ((*(int *)(m) = 1), 0))
#define mutex_trylock(m)
#define mutex_unlock(m)   __libc_maybe_call2 (pthread_mutex_unlock, (m), (*(int *)(m) = 0))
#define thread_atfork(prepare, parent, child)
#define tsd_key_create(key, destr)   ((void) (key))
#define tsd_setspecific(key, data)   __libc_tsd_set (MALLOC, (data))
#define tsd_getspecific(key, vptr)   ((vptr) = __libc_tsd_get (MALLOC))

Typedefs

typedef int tsd_key_t [1]

Functions

 __libc_lock_define (typedef, mutex_t) extern void *__dso_handle __attribute__((__weak__))

Define Documentation

#define mutex_init (   m)    __libc_maybe_call2 (pthread_mutex_init, (m, NULL), (*(int *)(m) = 0))
#define mutex_lock (   m)    __libc_maybe_call2 (pthread_mutex_lock, (m), ((*(int *)(m) = 1), 0))
#define mutex_trylock (   m)
Value:
__libc_maybe_call2 (pthread_mutex_trylock, (m), \
                    (*(int *)(m) ? 1 : ((*(int *)(m) = 1), 0)))
#define mutex_unlock (   m)    __libc_maybe_call2 (pthread_mutex_unlock, (m), (*(int *)(m) = 0))
#define thread_atfork (   prepare,
  parent,
  child 
)
Value:

Definition at line 50 of file malloc-machine.h.

#define tsd_getspecific (   key,
  vptr 
)    ((vptr) = __libc_tsd_get (MALLOC))
#define tsd_key_create (   key,
  destr 
)    ((void) (key))
#define tsd_setspecific (   key,
  data 
)    __libc_tsd_set (MALLOC, (data))

Typedef Documentation

typedef int tsd_key_t[1]

Definition at line 59 of file malloc-machine.h.


Function Documentation

__libc_lock_define ( typedef  ,
mutex_t   
)