Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
rwlock.h File Reference

Go to the source code of this file.

Macros

#define rwlock_init(lock)   do { *(lock) = __RW_LOCK_UNLOCKED(lock); } while (0)
 
#define do_raw_read_lock(rwlock)   do {__acquire(lock); arch_read_lock(&(rwlock)->raw_lock); } while (0)
 
#define do_raw_read_lock_flags(lock, flags)   do {__acquire(lock); arch_read_lock_flags(&(lock)->raw_lock, *(flags)); } while (0)
 
#define do_raw_read_trylock(rwlock)   arch_read_trylock(&(rwlock)->raw_lock)
 
#define do_raw_read_unlock(rwlock)   do {arch_read_unlock(&(rwlock)->raw_lock); __release(lock); } while (0)
 
#define do_raw_write_lock(rwlock)   do {__acquire(lock); arch_write_lock(&(rwlock)->raw_lock); } while (0)
 
#define do_raw_write_lock_flags(lock, flags)   do {__acquire(lock); arch_write_lock_flags(&(lock)->raw_lock, *(flags)); } while (0)
 
#define do_raw_write_trylock(rwlock)   arch_write_trylock(&(rwlock)->raw_lock)
 
#define do_raw_write_unlock(rwlock)   do {arch_write_unlock(&(rwlock)->raw_lock); __release(lock); } while (0)
 
#define read_can_lock(rwlock)   arch_read_can_lock(&(rwlock)->raw_lock)
 
#define write_can_lock(rwlock)   arch_write_can_lock(&(rwlock)->raw_lock)
 
#define read_trylock(lock)   __cond_lock(lock, _raw_read_trylock(lock))
 
#define write_trylock(lock)   __cond_lock(lock, _raw_write_trylock(lock))
 
#define write_lock(lock)   _raw_write_lock(lock)
 
#define read_lock(lock)   _raw_read_lock(lock)
 
#define read_lock_irqsave(lock, flags)
 
#define write_lock_irqsave(lock, flags)
 
#define read_lock_irq(lock)   _raw_read_lock_irq(lock)
 
#define read_lock_bh(lock)   _raw_read_lock_bh(lock)
 
#define write_lock_irq(lock)   _raw_write_lock_irq(lock)
 
#define write_lock_bh(lock)   _raw_write_lock_bh(lock)
 
#define read_unlock(lock)   _raw_read_unlock(lock)
 
#define write_unlock(lock)   _raw_write_unlock(lock)
 
#define read_unlock_irq(lock)   _raw_read_unlock_irq(lock)
 
#define write_unlock_irq(lock)   _raw_write_unlock_irq(lock)
 
#define read_unlock_irqrestore(lock, flags)
 
#define read_unlock_bh(lock)   _raw_read_unlock_bh(lock)
 
#define write_unlock_irqrestore(lock, flags)
 
#define write_unlock_bh(lock)   _raw_write_unlock_bh(lock)
 
#define write_trylock_irqsave(lock, flags)
 

Macro Definition Documentation

#define do_raw_read_lock (   rwlock)    do {__acquire(lock); arch_read_lock(&(rwlock)->raw_lock); } while (0)

Definition at line 41 of file rwlock.h.

#define do_raw_read_lock_flags (   lock,
  flags 
)    do {__acquire(lock); arch_read_lock_flags(&(lock)->raw_lock, *(flags)); } while (0)

Definition at line 42 of file rwlock.h.

#define do_raw_read_trylock (   rwlock)    arch_read_trylock(&(rwlock)->raw_lock)

Definition at line 44 of file rwlock.h.

#define do_raw_read_unlock (   rwlock)    do {arch_read_unlock(&(rwlock)->raw_lock); __release(lock); } while (0)

Definition at line 45 of file rwlock.h.

#define do_raw_write_lock (   rwlock)    do {__acquire(lock); arch_write_lock(&(rwlock)->raw_lock); } while (0)

Definition at line 46 of file rwlock.h.

#define do_raw_write_lock_flags (   lock,
  flags 
)    do {__acquire(lock); arch_write_lock_flags(&(lock)->raw_lock, *(flags)); } while (0)

Definition at line 47 of file rwlock.h.

#define do_raw_write_trylock (   rwlock)    arch_write_trylock(&(rwlock)->raw_lock)

Definition at line 49 of file rwlock.h.

#define do_raw_write_unlock (   rwlock)    do {arch_write_unlock(&(rwlock)->raw_lock); __release(lock); } while (0)

Definition at line 50 of file rwlock.h.

#define read_can_lock (   rwlock)    arch_read_can_lock(&(rwlock)->raw_lock)

Definition at line 53 of file rwlock.h.

#define read_lock (   lock)    _raw_read_lock(lock)

Definition at line 65 of file rwlock.h.

#define read_lock_bh (   lock)    _raw_read_lock_bh(lock)

Definition at line 96 of file rwlock.h.

#define read_lock_irq (   lock)    _raw_read_lock_irq(lock)

Definition at line 95 of file rwlock.h.

#define read_lock_irqsave (   lock,
  flags 
)
Value:
do { \
typecheck(unsigned long, flags); \
_raw_read_lock_irqsave(lock, flags); \
} while (0)

Definition at line 82 of file rwlock.h.

#define read_trylock (   lock)    __cond_lock(lock, _raw_read_trylock(lock))

Definition at line 61 of file rwlock.h.

#define read_unlock (   lock)    _raw_read_unlock(lock)

Definition at line 99 of file rwlock.h.

#define read_unlock_bh (   lock)    _raw_read_unlock_bh(lock)

Definition at line 109 of file rwlock.h.

#define read_unlock_irq (   lock)    _raw_read_unlock_irq(lock)

Definition at line 101 of file rwlock.h.

#define read_unlock_irqrestore (   lock,
  flags 
)
Value:
do { \
typecheck(unsigned long, flags); \
_raw_read_unlock_irqrestore(lock, flags); \
} while (0)

Definition at line 104 of file rwlock.h.

#define rwlock_init (   lock)    do { *(lock) = __RW_LOCK_UNLOCKED(lock); } while (0)

Definition at line 27 of file rwlock.h.

#define write_can_lock (   rwlock)    arch_write_can_lock(&(rwlock)->raw_lock)

Definition at line 54 of file rwlock.h.

#define write_lock (   lock)    _raw_write_lock(lock)

Definition at line 64 of file rwlock.h.

#define write_lock_bh (   lock)    _raw_write_lock_bh(lock)

Definition at line 98 of file rwlock.h.

#define write_lock_irq (   lock)    _raw_write_lock_irq(lock)

Definition at line 97 of file rwlock.h.

#define write_lock_irqsave (   lock,
  flags 
)
Value:
do { \
typecheck(unsigned long, flags); \
_raw_write_lock_irqsave(lock, flags); \
} while (0)

Definition at line 87 of file rwlock.h.

#define write_trylock (   lock)    __cond_lock(lock, _raw_write_trylock(lock))

Definition at line 62 of file rwlock.h.

#define write_trylock_irqsave (   lock,
  flags 
)
Value:
({ \
local_irq_save(flags); \
write_trylock(lock) ? \
1 : ({ local_irq_restore(flags); 0; }); \
})

Definition at line 118 of file rwlock.h.

#define write_unlock (   lock)    _raw_write_unlock(lock)

Definition at line 100 of file rwlock.h.

#define write_unlock_bh (   lock)    _raw_write_unlock_bh(lock)

Definition at line 116 of file rwlock.h.

#define write_unlock_irq (   lock)    _raw_write_unlock_irq(lock)

Definition at line 102 of file rwlock.h.

#define write_unlock_irqrestore (   lock,
  flags 
)
Value:
do { \
typecheck(unsigned long, flags); \
_raw_write_unlock_irqrestore(lock, flags); \
} while (0)

Definition at line 111 of file rwlock.h.