Back to index

glibc  2.9
Defines | Typedefs | Functions
machine-lock.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define __SPIN_LOCK_INITIALIZER   0L
#define _EXTERN_INLINE   __extern_inline

Typedefs

typedef __volatile long int __spin_lock_t

Functions

_EXTERN_INLINE void __spin_unlock (__spin_lock_t *__lock)
_EXTERN_INLINE int __spin_try_lock (register __spin_lock_t *__lock)
_EXTERN_INLINE int __spin_lock_locked (__spin_lock_t *__lock)

Define Documentation

#define __SPIN_LOCK_INITIALIZER   0L

Definition at line 29 of file machine-lock.h.

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


Typedef Documentation

Definition at line 25 of file machine-lock.h.


Function Documentation

Definition at line 66 of file machine-lock.h.

{
  long int __rtn;
  __asm__ __volatile__ ("\
0:     lwarx  %0,0,%1\n\
       stwcx. %0,0,%1\n\
       bne-   0b\n\
" : "=&r" (__rtn) : "r" (__lock) : "cr0");
  return __rtn;
}

Here is the call graph for this function:

Definition at line 52 of file machine-lock.h.

{
  long int __rtn;
  __asm__ __volatile__ ("\
0:     lwarx  %0,0,%1\n\
       stwcx. %2,0,%1\n\
       bne-   0b\n\
" : "=&r" (__rtn) : "r" (__lock), "r" (1) : "cr0");
  return !__rtn;
}

Here is the call graph for this function:

Definition at line 39 of file machine-lock.h.

{
  long int __locked;
  __asm__ __volatile__ ("\
0:     lwarx  %0,0,%1\n\
       stwcx. %2,0,%1\n\
       bne-   0b\n\
" : "=&r" (__locked) : "r" (__lock), "r" (0) : "cr0");
}

Here is the call graph for this function: