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)
#define mutex_lock(m)
#define mutex_trylock(m)
#define mutex_unlock(m)
#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)
Value:
__libc_maybe_call (__pthread_mutex_init, (m, NULL), \
              (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT),(*(int *)(m))) )
#define mutex_lock (   m)
Value:
__libc_maybe_call (__pthread_mutex_lock, (m), \
                     (__load_and_clear(&((m)->__m_lock.__spinlock)), 0))
#define mutex_trylock (   m)
Value:
__libc_maybe_call (__pthread_mutex_trylock, (m), \
                     (*(int *)(m) ? 1 : (__load_and_clear(&((m)->__m_lock.__spinlock)), 0)))
#define mutex_unlock (   m)
Value:
__libc_maybe_call (__pthread_mutex_unlock, (m), \
                     (((m)->__m_lock.__spinlock = __LT_SPINLOCK_INIT), (*(int *)(m))) )
#define thread_atfork (   prepare,
  parent,
  child 
)
Value:

Definition at line 56 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 65 of file malloc-machine.h.


Function Documentation

__libc_lock_define ( typedef  ,
mutex_t   
)