Linux Kernel
3.7.1
|
#include <linux/typecheck.h>
#include <linux/preempt.h>
#include <linux/linkage.h>
#include <linux/compiler.h>
#include <linux/irqflags.h>
#include <linux/thread_info.h>
#include <linux/kernel.h>
#include <linux/stringify.h>
#include <linux/bottom_half.h>
#include <asm/barrier.h>
#include <linux/spinlock_types.h>
#include <linux/spinlock_up.h>
#include <linux/rwlock.h>
#include <linux/spinlock_api_up.h>
#include <linux/atomic.h>
Go to the source code of this file.
Functions | |
int | _atomic_dec_and_lock (atomic_t *atomic, spinlock_t *lock) |
#define __lockfunc __attribute__((section(".spinlock.text"))) |
Definition at line 76 of file spinlock.h.
#define assert_spin_locked | ( | lock | ) | assert_raw_spin_locked(&(lock)->rlock) |
Definition at line 378 of file spinlock.h.
#define atomic_dec_and_lock | ( | atomic, | |
lock | |||
) | __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) |
Definition at line 394 of file spinlock.h.
#define LOCK_SECTION_END ".previous\n\t" |
Definition at line 73 of file spinlock.h.
#define LOCK_SECTION_NAME ".text..lock."KBUILD_BASENAME |
Definition at line 64 of file spinlock.h.
#define LOCK_SECTION_START | ( | extra | ) |
Definition at line 66 of file spinlock.h.
#define raw_spin_can_lock | ( | lock | ) | (!raw_spin_is_locked(lock)) |
raw_spin_can_lock - would raw_spin_trylock() succeed? : the spinlock in question.
Definition at line 254 of file spinlock.h.
Definition at line 116 of file spinlock.h.
#define raw_spin_is_locked | ( | lock | ) | arch_spin_is_locked(&(lock)->raw_lock) |
Definition at line 107 of file spinlock.h.
#define raw_spin_lock | ( | lock | ) | _raw_spin_lock(lock) |
Definition at line 170 of file spinlock.h.
#define raw_spin_lock_bh | ( | lock | ) | _raw_spin_lock_bh(lock) |
Definition at line 222 of file spinlock.h.
#define raw_spin_lock_init | ( | lock | ) | do { *(lock) = __RAW_SPIN_LOCK_UNLOCKED(lock); } while (0) |
Definition at line 103 of file spinlock.h.
#define raw_spin_lock_irq | ( | lock | ) | _raw_spin_lock_irq(lock) |
Definition at line 221 of file spinlock.h.
Definition at line 210 of file spinlock.h.
Definition at line 216 of file spinlock.h.
#define raw_spin_lock_nest_lock | ( | lock, | |
nest_lock | |||
) | _raw_spin_lock(lock) |
Definition at line 183 of file spinlock.h.
#define raw_spin_lock_nested | ( | lock, | |
subclass | |||
) | _raw_spin_lock(lock) |
Definition at line 182 of file spinlock.h.
#define raw_spin_trylock | ( | lock | ) | __cond_lock(lock, _raw_spin_trylock(lock)) |
Definition at line 168 of file spinlock.h.
#define raw_spin_trylock_bh | ( | lock | ) | __cond_lock(lock, _raw_spin_trylock_bh(lock)) |
Definition at line 233 of file spinlock.h.
#define raw_spin_trylock_irq | ( | lock | ) |
Definition at line 236 of file spinlock.h.
Definition at line 243 of file spinlock.h.
#define raw_spin_unlock | ( | lock | ) | _raw_spin_unlock(lock) |
Definition at line 223 of file spinlock.h.
#define raw_spin_unlock_bh | ( | lock | ) | _raw_spin_unlock_bh(lock) |
Definition at line 231 of file spinlock.h.
#define raw_spin_unlock_irq | ( | lock | ) | _raw_spin_unlock_irq(lock) |
Definition at line 224 of file spinlock.h.
Definition at line 226 of file spinlock.h.
#define raw_spin_unlock_wait | ( | lock | ) | arch_spin_unlock_wait(&(lock)->raw_lock) |
raw_spin_unlock_wait - wait until the spinlock gets unlocked : the spinlock in question.
Definition at line 129 of file spinlock.h.
#define spin_lock_init | ( | _lock | ) |
Definition at line 277 of file spinlock.h.
Definition at line 313 of file spinlock.h.
Definition at line 318 of file spinlock.h.
#define spin_lock_nest_lock | ( | lock, | |
nest_lock | |||
) |
Definition at line 303 of file spinlock.h.
Definition at line 298 of file spinlock.h.
Definition at line 353 of file spinlock.h.
int _atomic_dec_and_lock | ( | atomic_t * | atomic, |
spinlock_t * | lock | ||
) |
atomic_dec_and_lock - lock on reaching reference count zero : the atomic counter : the spinlock in question
Decrements by 1. If the result is 0, returns true and locks . Returns false for all other cases.
Definition at line 20 of file dec_and_lock.c.