Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
spinlock.h File Reference
#include <linux/compiler.h>
#include <linux/atomic.h>
#include <asm/dcache_clear.h>
#include <asm/page.h>

Go to the source code of this file.

Macros

#define arch_spin_is_locked(x)   (*(volatile int *)(&(x)->slock) <= 0)
 
#define arch_spin_lock_flags(lock, flags)   arch_spin_lock(lock)
 
#define arch_spin_unlock_wait(x)   do { cpu_relax(); } while (arch_spin_is_locked(x))
 
#define arch_read_can_lock(x)   ((int)(x)->lock > 0)
 
#define arch_write_can_lock(x)   ((x)->lock == RW_LOCK_BIAS)
 
#define arch_read_lock_flags(lock, flags)   arch_read_lock(lock)
 
#define arch_write_lock_flags(lock, flags)   arch_write_lock(lock)
 
#define arch_spin_relax(lock)   cpu_relax()
 
#define arch_read_relax(lock)   cpu_relax()
 
#define arch_write_relax(lock)   cpu_relax()
 

Macro Definition Documentation

#define arch_read_can_lock (   x)    ((int)(x)->lock > 0)

read_can_lock - would read_trylock() succeed? : the rwlock in question.

Definition at line 144 of file spinlock.h.

#define arch_read_lock_flags (   lock,
  flags 
)    arch_read_lock(lock)

Definition at line 320 of file spinlock.h.

#define arch_read_relax (   lock)    cpu_relax()

Definition at line 324 of file spinlock.h.

#define arch_spin_is_locked (   x)    (*(volatile int *)(&(x)->slock) <= 0)

Definition at line 28 of file spinlock.h.

#define arch_spin_lock_flags (   lock,
  flags 
)    arch_spin_lock(lock)

Definition at line 29 of file spinlock.h.

#define arch_spin_relax (   lock)    cpu_relax()

Definition at line 323 of file spinlock.h.

#define arch_spin_unlock_wait (   x)    do { cpu_relax(); } while (arch_spin_is_locked(x))

Definition at line 30 of file spinlock.h.

#define arch_write_can_lock (   x)    ((x)->lock == RW_LOCK_BIAS)

write_can_lock - would write_trylock() succeed? : the rwlock in question.

Definition at line 150 of file spinlock.h.

#define arch_write_lock_flags (   lock,
  flags 
)    arch_write_lock(lock)

Definition at line 321 of file spinlock.h.

#define arch_write_relax (   lock)    cpu_relax()

Definition at line 325 of file spinlock.h.