Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
spinlock.h File Reference
#include <linux/smp.h>

Go to the source code of this file.

Macros

#define arch_spin_is_locked(x)   ((x)->owner_cpu != 0)
 
#define arch_spin_unlock_wait(lock)
 
#define arch_read_can_lock(x)   ((int)(x)->lock >= 0)
 
#define arch_write_can_lock(x)   ((x)->lock == 0)
 
#define arch_read_relax(lock)   cpu_relax()
 
#define arch_write_relax(lock)   cpu_relax()
 

Functions

void arch_spin_lock_wait (arch_spinlock_t *)
 
void arch_spin_lock_wait_flags (arch_spinlock_t *, unsigned long flags)
 
int arch_spin_trylock_retry (arch_spinlock_t *)
 
void arch_spin_relax (arch_spinlock_t *lock)
 
void _raw_read_lock_wait (arch_rwlock_t *lp)
 
void _raw_read_lock_wait_flags (arch_rwlock_t *lp, unsigned long flags)
 
int _raw_read_trylock_retry (arch_rwlock_t *lp)
 
void _raw_write_lock_wait (arch_rwlock_t *lp)
 
void _raw_write_lock_wait_flags (arch_rwlock_t *lp, unsigned long flags)
 
int _raw_write_trylock_retry (arch_rwlock_t *lp)
 

Variables

int spin_retry
 

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 98 of file spinlock.h.

#define arch_read_relax (   lock)    cpu_relax()

Definition at line 173 of file spinlock.h.

#define arch_spin_is_locked (   x)    ((x)->owner_cpu != 0)

Definition at line 37 of file spinlock.h.

#define arch_spin_unlock_wait (   lock)
Value:
do { while (arch_spin_is_locked(lock)) \
arch_spin_relax(lock); } while (0)

Definition at line 38 of file spinlock.h.

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

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

Definition at line 104 of file spinlock.h.

#define arch_write_relax (   lock)    cpu_relax()

Definition at line 174 of file spinlock.h.

Function Documentation

void _raw_read_lock_wait ( arch_rwlock_t lp)

Definition at line 114 of file spinlock.c.

void _raw_read_lock_wait_flags ( arch_rwlock_t lp,
unsigned long  flags 
)

Definition at line 133 of file spinlock.c.

int _raw_read_trylock_retry ( arch_rwlock_t lp)

Definition at line 154 of file spinlock.c.

void _raw_write_lock_wait ( arch_rwlock_t lp)

Definition at line 170 of file spinlock.c.

void _raw_write_lock_wait_flags ( arch_rwlock_t lp,
unsigned long  flags 
)

Definition at line 187 of file spinlock.c.

int _raw_write_trylock_retry ( arch_rwlock_t lp)

Definition at line 206 of file spinlock.c.

void arch_spin_lock_wait ( arch_spinlock_t )

Definition at line 27 of file spinlock.c.

void arch_spin_lock_wait_flags ( arch_spinlock_t ,
unsigned long  flags 
)

Definition at line 55 of file spinlock.c.

void arch_spin_relax ( arch_spinlock_t lock)

Definition at line 103 of file spinlock.c.

int arch_spin_trylock_retry ( arch_spinlock_t )

Definition at line 88 of file spinlock.c.

Variable Documentation

int spin_retry

Definition at line 15 of file spinlock.c.