Back to index

glibc  2.9
Classes | Defines | Typedefs | Functions
libc-lock.h File Reference

Go to the source code of this file.

Classes

struct  __libc_once

Defines

#define __libc_lock_define(CLASS, NAME)   CLASS __libc_lock_t NAME;
#define __libc_lock_define_initialized(CLASS, NAME)   CLASS __libc_lock_t NAME = MUTEX_INITIALIZER;
#define __libc_lock_init(NAME)   __mutex_init (&(NAME))
#define __libc_lock_fini(NAME)   __mutex_unlock (&(NAME))
#define __libc_lock_lock(NAME)   __mutex_lock (&(NAME))
#define __libc_lock_trylock(NAME)   (!__mutex_trylock (&(NAME)))
#define __libc_lock_unlock(NAME)   __mutex_unlock (&(NAME))
#define __libc_rwlock_define   __libc_lock_define
#define __libc_rwlock_define_initialized   __libc_lock_define_initialized
#define __libc_rwlock_init   __libc_lock_init
#define __libc_rwlock_fini   __libc_lock_fini
#define __libc_rwlock_rdlock   __libc_lock_lock
#define __libc_rwlock_wrlock   __libc_lock_lock
#define __libc_rwlock_tryrdlock   __libc_lock_trylock
#define __libc_rwlock_trywrlock   __libc_lock_trylock
#define __libc_rwlock_unlock   __libc_lock_unlock
#define __libc_cleanup_region_start(DOIT, FCT, ARG)
#define __libc_cleanup_region_end(DOIT)
#define __libc_cleanup_end(DOIT)
#define __libc_once_define(CLASS, NAME)   CLASS struct __libc_once NAME = { MUTEX_INITIALIZER, 0 }
#define __libc_once(ONCE_CONTROL, INIT_FUNCTION)
#define __libc_key_create(KEY, DEST)   cthread_keycreate (KEY)
#define __libc_setspecific(KEY, VAL)   cthread_setspecific (KEY, VAL)
#define __libc_lock_define_initialized_recursive   __libc_lock_define_initialized
#define __libc_lock_init_recursive   __libc_lock_init
#define __libc_lock_fini_recursive   __libc_lock_fini
#define __libc_lock_trylock_recursive   __libc_lock_trylock
#define __libc_lock_unlock_recursive   __libc_lock_unlock
#define __libc_lock_lock_recursive   __libc_lock_lock
#define __rtld_lock_define_initialized_recursive   __libc_lock_define_initialized
#define __rtld_lock_init_recursive   __libc_lock_init
#define __rtld_lock_fini_recursive   __libc_lock_fini
#define __rtld_lock_trylock_recursive   __libc_lock_trylock
#define __rtld_lock_unlock_recursive   __libc_lock_unlock
#define __rtld_lock_lock_recursive   __libc_lock_lock

Typedefs

typedef struct __libc_lock_opaque__
typedef cthread_key_t __libc_key_t

Functions

void * __libc_getspecific (__libc_key_t key)

Class Documentation

struct __libc_once

Definition at line 99 of file libc-lock.h.

Class Members
int done
__libc_lock_t lock

Define Documentation

#define __libc_cleanup_end (   DOIT)
Value:
if ((DOIT) && __save_FCT != 0)                                     \
    (*__save_FCT)(__save_ARG);                                            \

Definition at line 92 of file libc-lock.h.

#define __libc_cleanup_region_end (   DOIT)
Value:
if ((DOIT) && __save_FCT != 0)                                     \
    (*__save_FCT)(__save_ARG);                                            \
}

Definition at line 86 of file libc-lock.h.

#define __libc_cleanup_region_start (   DOIT,
  FCT,
  ARG 
)
Value:
{                                                                  \
  typeof (***(FCT)) *__save_FCT = (DOIT) ? (FCT) : 0;                     \
  typeof (ARG) __save_ARG = ARG;                                   \
  /* close brace is in __libc_cleanup_region_end below. */

Definition at line 79 of file libc-lock.h.

#define __libc_key_create (   KEY,
  DEST 
)    cthread_keycreate (KEY)

Definition at line 125 of file libc-lock.h.

#define __libc_lock_define (   CLASS,
  NAME 
)    CLASS __libc_lock_t NAME;

Definition at line 40 of file libc-lock.h.

#define __libc_lock_define_initialized (   CLASS,
  NAME 
)    CLASS __libc_lock_t NAME = MUTEX_INITIALIZER;

Definition at line 44 of file libc-lock.h.

Definition at line 130 of file libc-lock.h.

#define __libc_lock_fini (   NAME)    __mutex_unlock (&(NAME))

Definition at line 54 of file libc-lock.h.

Definition at line 132 of file libc-lock.h.

#define __libc_lock_init (   NAME)    __mutex_init (&(NAME))

Definition at line 49 of file libc-lock.h.

Definition at line 131 of file libc-lock.h.

#define __libc_lock_lock (   NAME)    __mutex_lock (&(NAME))

Definition at line 57 of file libc-lock.h.

Definition at line 135 of file libc-lock.h.

#define __libc_lock_trylock (   NAME)    (!__mutex_trylock (&(NAME)))

Definition at line 60 of file libc-lock.h.

Definition at line 133 of file libc-lock.h.

#define __libc_lock_unlock (   NAME)    __mutex_unlock (&(NAME))

Definition at line 63 of file libc-lock.h.

Definition at line 134 of file libc-lock.h.

#define __libc_once (   ONCE_CONTROL,
  INIT_FUNCTION 
)
Value:
do {                                                                 \
    __libc_lock_lock (ONCE_CONTROL.lock);                            \
    if (!ONCE_CONTROL.done)                                          \
      (INIT_FUNCTION) ();                                            \
    ONCE_CONTROL.done = 1;                                           \
    __libc_lock_unlock (ONCE_CONTROL.lock);                                 \
  } while (0)

Definition at line 110 of file libc-lock.h.

#define __libc_once_define (   CLASS,
  NAME 
)    CLASS struct __libc_once NAME = { MUTEX_INITIALIZER, 0 }

Definition at line 105 of file libc-lock.h.

Definition at line 67 of file libc-lock.h.

Definition at line 68 of file libc-lock.h.

Definition at line 70 of file libc-lock.h.

Definition at line 69 of file libc-lock.h.

Definition at line 71 of file libc-lock.h.

Definition at line 73 of file libc-lock.h.

Definition at line 74 of file libc-lock.h.

Definition at line 75 of file libc-lock.h.

Definition at line 72 of file libc-lock.h.

#define __libc_setspecific (   KEY,
  VAL 
)    cthread_setspecific (KEY, VAL)

Definition at line 126 of file libc-lock.h.

Definition at line 137 of file libc-lock.h.

Definition at line 139 of file libc-lock.h.

Definition at line 138 of file libc-lock.h.

Definition at line 142 of file libc-lock.h.

Definition at line 140 of file libc-lock.h.

Definition at line 141 of file libc-lock.h.


Typedef Documentation

typedef cthread_key_t __libc_key_t

Definition at line 31 of file libc-lock.h.

typedef struct __libc_lock_opaque__

Definition at line 27 of file libc-lock.h.


Function Documentation