Go to the source code of this file.
Data Structures | |
| struct | spinlock_t |
Defines | |
| #define | SPIN_LOCK_UNLOCKED (spinlock_t) { 1 } |
| #define | barrier() __asm__ __volatile__("": : :"memory") |
| #define | spin_is_locked(x) (*(volatile char *)(&(x)->lock) <= 0) |
| #define | spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x)) |
| #define | spin_lock_string |
| #define | spin_unlock_string "movb $1,%0" |
Functions | |
| static | __attribute__ ((always_inline)) void spin_lock(spinlock_t *lock) |
| #define barrier | ( | ) | __asm__ __volatile__("": : :"memory") |
Definition at line 21 of file spinlock.h.
| #define spin_is_locked | ( | x | ) | (*(volatile char *)(&(x)->lock) <= 0) |
Definition at line 22 of file spinlock.h.
| #define spin_lock_string |
Value:
"\n1:\t" \ "lock ; decb %0\n\t" \ "js 2f\n" \ ".section .text.lock,\"ax\"\n" \ "2:\t" \ "cmpb $0,%0\n\t" \ "rep;nop\n\t" \ "jle 2b\n\t" \ "jmp 1b\n" \ ".previous"
Definition at line 25 of file spinlock.h.
Referenced by __attribute__().
| #define SPIN_LOCK_UNLOCKED (spinlock_t) { 1 } |
Definition at line 13 of file spinlock.h.
| #define spin_unlock_string "movb $1,%0" |
Definition at line 40 of file spinlock.h.
| #define spin_unlock_wait | ( | x | ) | do { barrier(); } while(spin_is_locked(x)) |
Definition at line 23 of file spinlock.h.
| static __attribute__ | ( | (always_inline) | ) | [inline, static] |
Definition at line 43 of file spinlock.h.
References __asm__(), and spin_lock_string.

1.5.5