Back to index

glibc  2.9
Defines | Functions
lock-intern.h File Reference
#include <sys/cdefs.h>
#include <machine-lock.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _EXTERN_INLINE   __extern_inline

Functions

_EXTERN_INLINE void __spin_lock_init (__spin_lock_t *__lock)
void __spin_lock_solid (__spin_lock_t *__lock)
_EXTERN_INLINE void __spin_lock (__spin_lock_t *__lock)
void __mutex_init (void *__lock)
void __mutex_lock_solid (void *__lock)
void __mutex_unlock_solid (void *__lock)
_EXTERN_INLINE void __mutex_lock (void *__lock)
_EXTERN_INLINE void __mutex_unlock (void *__lock)
_EXTERN_INLINE int __mutex_trylock (void *__lock)

Define Documentation

Definition at line 26 of file lock-intern.h.


Function Documentation

void __mutex_init ( void *  __lock)

Definition at line 24 of file mutex-init.c.

{
  /* This happens to be name space-safe because it is a macro.
     It invokes only spin_lock_init, which is a macro for __spin_lock_init;
     and cthread_queue_init, which is a macro for some simple code.  */
  mutex_init ((struct mutex *) lock);
}

Here is the caller graph for this function:

_EXTERN_INLINE void __mutex_lock ( void *  __lock)

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

{
  if (! __spin_try_lock ((__spin_lock_t *) __lock))
    __mutex_lock_solid (__lock);
}

Here is the call graph for this function:

void __mutex_lock_solid ( void *  __lock)

Definition at line 29 of file mutex-solid.c.

Here is the call graph for this function:

Here is the caller graph for this function:

_EXTERN_INLINE int __mutex_trylock ( void *  __lock)

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

{
  return __spin_try_lock ((__spin_lock_t *) __lock);
}

Here is the call graph for this function:

_EXTERN_INLINE void __mutex_unlock ( void *  __lock)

Definition at line 84 of file lock-intern.h.

{
  __spin_unlock ((__spin_lock_t *) __lock);
  __mutex_unlock_solid (__lock);
}

Here is the call graph for this function:

void __mutex_unlock_solid ( void *  __lock)

Definition at line 35 of file mutex-solid.c.

{
}

Here is the caller graph for this function:

Definition at line 45 of file lock-intern.h.

{
  if (! __spin_try_lock (__lock))
    __spin_lock_solid (__lock);
}

Here is the call graph for this function:

Definition at line 33 of file lock-intern.h.

{
  *__lock = __SPIN_LOCK_INITIALIZER;
}

Here is the caller graph for this function:

void __spin_lock_solid ( __spin_lock_t __lock)

Definition at line 23 of file spin-solid.c.

{
  while (__spin_lock_locked (lock) || ! __spin_try_lock (lock))
    /* Yield to another thread (system call).  */
    __swtch_pri (0);
}

Here is the call graph for this function:

Here is the caller graph for this function: