Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
spinlock_32.h File Reference
#include <asm/psr.h>
#include <asm/processor.h>

Go to the source code of this file.

Macros

#define arch_spin_is_locked(lock)   (*((volatile unsigned char *)(lock)) != 0)
 
#define arch_spin_unlock_wait(lock)   do { while (arch_spin_is_locked(lock)) cpu_relax(); } while (0)
 
#define arch_read_lock(lock)
 
#define arch_read_unlock(lock)
 
#define arch_read_trylock(lock)
 
#define arch_spin_lock_flags(lock, flags)   arch_spin_lock(lock)
 
#define arch_read_lock_flags(rw, flags)   arch_read_lock(rw)
 
#define arch_write_lock_flags(rw, flags)   arch_write_lock(rw)
 
#define arch_spin_relax(lock)   cpu_relax()
 
#define arch_read_relax(lock)   cpu_relax()
 
#define arch_write_relax(lock)   cpu_relax()
 
#define arch_read_can_lock(rw)   (!((rw)->lock & 0xff))
 
#define arch_write_can_lock(rw)   (!(rw)->lock)
 

Macro Definition Documentation

#define arch_read_can_lock (   rw)    (!((rw)->lock & 0xff))

Definition at line 195 of file spinlock_32.h.

#define arch_read_lock (   lock)
Value:
do { unsigned long flags; \
local_irq_save(flags); \
__arch_read_lock(lock); \
local_irq_restore(flags); \
} while(0)

Definition at line 93 of file spinlock_32.h.

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

Definition at line 188 of file spinlock_32.h.

#define arch_read_relax (   lock)    cpu_relax()

Definition at line 192 of file spinlock_32.h.

#define arch_read_trylock (   lock)
Value:
({ unsigned long flags; \
int res; \
local_irq_save(flags); \
res = __arch_read_trylock(lock); \
local_irq_restore(flags); \
res; \
})

Definition at line 178 of file spinlock_32.h.

#define arch_read_unlock (   lock)
Value:
do { unsigned long flags; \
local_irq_save(flags); \
__arch_read_unlock(lock); \
local_irq_restore(flags); \
} while(0)

Definition at line 113 of file spinlock_32.h.

#define arch_spin_is_locked (   lock)    (*((volatile unsigned char *)(lock)) != 0)

Definition at line 14 of file spinlock_32.h.

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

Definition at line 187 of file spinlock_32.h.

#define arch_spin_relax (   lock)    cpu_relax()

Definition at line 191 of file spinlock_32.h.

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

Definition at line 16 of file spinlock_32.h.

#define arch_write_can_lock (   rw)    (!(rw)->lock)

Definition at line 196 of file spinlock_32.h.

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

Definition at line 189 of file spinlock_32.h.

#define arch_write_relax (   lock)    cpu_relax()

Definition at line 193 of file spinlock_32.h.