Linux Kernel
3.7.1
|
#include <linux/rwsem.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/lockdep.h>
#include <linux/spinlock.h>
#include <linux/kallsyms.h>
#include <linux/interrupt.h>
#include <linux/debug_locks.h>
#include <linux/irqflags.h>
#include "locking-selftest-spin.h"
#include "locking-selftest-wlock.h"
#include "locking-selftest-rlock.h"
#include "locking-selftest-mutex.h"
#include "locking-selftest-wsem.h"
#include "locking-selftest-rsem.h"
#include "locking-selftest-spin-hardirq.h"
#include "locking-selftest-rlock-hardirq.h"
#include "locking-selftest-wlock-hardirq.h"
#include "locking-selftest-spin-softirq.h"
#include "locking-selftest-rlock-softirq.h"
#include "locking-selftest-wlock-softirq.h"
#include "locking-selftest-hardirq.h"
#include "locking-selftest-softirq.h"
Go to the source code of this file.
Macros | |
#define | FAILURE 0 |
#define | SUCCESS 1 |
#define | LOCKTYPE_SPIN 0x1 |
#define | LOCKTYPE_RWLOCK 0x2 |
#define | LOCKTYPE_MUTEX 0x4 |
#define | LOCKTYPE_RWSEM 0x8 |
#define | INIT_CLASS_FUNC(class) |
#define | HARDIRQ_DISABLE local_irq_disable |
#define | HARDIRQ_ENABLE local_irq_enable |
#define | HARDIRQ_ENTER() |
#define | HARDIRQ_EXIT() |
#define | SOFTIRQ_DISABLE local_bh_disable |
#define | SOFTIRQ_ENABLE local_bh_enable |
#define | SOFTIRQ_ENTER() |
#define | SOFTIRQ_EXIT() |
#define | L(x) spin_lock(&lock_##x) |
#define | U(x) spin_unlock(&lock_##x) |
#define | LU(x) L(x); U(x) |
#define | SI(x) spin_lock_init(&lock_##x) |
#define | WL(x) write_lock(&rwlock_##x) |
#define | WU(x) write_unlock(&rwlock_##x) |
#define | WLU(x) WL(x); WU(x) |
#define | RL(x) read_lock(&rwlock_##x) |
#define | RU(x) read_unlock(&rwlock_##x) |
#define | RLU(x) RL(x); RU(x) |
#define | RWI(x) rwlock_init(&rwlock_##x) |
#define | ML(x) mutex_lock(&mutex_##x) |
#define | MU(x) mutex_unlock(&mutex_##x) |
#define | MI(x) mutex_init(&mutex_##x) |
#define | WSL(x) down_write(&rwsem_##x) |
#define | WSU(x) up_write(&rwsem_##x) |
#define | RSL(x) down_read(&rwsem_##x) |
#define | RSU(x) up_read(&rwsem_##x) |
#define | RWSI(x) init_rwsem(&rwsem_##x) |
#define | LOCK_UNLOCK_2(x, y) LOCK(x); LOCK(y); UNLOCK(y); UNLOCK(x) |
#define | GENERATE_TESTCASE(name) |
#define | GENERATE_PERMUTATIONS_2_EVENTS(name) |
#define | GENERATE_PERMUTATIONS_3_EVENTS(name) |
#define | E() |
#define | E() |
#define | E() |
#define | E() |
#define | E() |
#define | E() |
#define | E() |
#define | E() |
#define | E() |
#define | E() |
#define | E1() |
#define | E2() |
#define | E1() |
#define | E2() |
#define | E1() |
#define | E2() |
#define | E1() |
#define | E2() |
#define | E3() |
#define | E1() |
#define | E2() |
#define | E3() |
#define | E1() |
#define | E2() |
#define | E3() |
#define | E1() |
#define | E2() |
#define | E3() |
#define | E1() |
#define | E2() |
#define | E3() |
#define | I_SPINLOCK(x) |
#define | I_RWLOCK(x) |
#define | I_MUTEX(x) |
#define | I_RWSEM(x) |
#define | I1(x) |
#define | I2(x) |
#define | DO_TESTCASE_1(desc, name, nr) |
#define | DO_TESTCASE_1B(desc, name, nr) |
#define | DO_TESTCASE_3(desc, name, nr) |
#define | DO_TESTCASE_3RW(desc, name, nr) |
#define | DO_TESTCASE_6(desc, name) |
#define | DO_TESTCASE_6_SUCCESS(desc, name) |
#define | DO_TESTCASE_6R(desc, name) |
#define | DO_TESTCASE_2I(desc, name, nr) |
#define | DO_TESTCASE_2IB(desc, name, nr) |
#define | DO_TESTCASE_6I(desc, name, nr) |
#define | DO_TESTCASE_6IRW(desc, name, nr) |
#define | DO_TESTCASE_2x3(desc, name) |
#define | DO_TESTCASE_2x6(desc, name) |
#define | DO_TESTCASE_6x2(desc, name) |
#define | DO_TESTCASE_6x2B(desc, name) |
#define | DO_TESTCASE_6x6(desc, name) |
#define | DO_TESTCASE_6x6RW(desc, name) |
Functions | |
__setup ("debug_locks_verbose=", setup_debug_locks_verbose) | |
void | locking_selftest (void) |
Definition at line 998 of file locking-selftest.c.
Definition at line 1003 of file locking-selftest.c.
Definition at line 1055 of file locking-selftest.c.
Definition at line 1059 of file locking-selftest.c.
Definition at line 1071 of file locking-selftest.c.
Definition at line 1075 of file locking-selftest.c.
Definition at line 1008 of file locking-selftest.c.
Definition at line 1015 of file locking-selftest.c.
Definition at line 1022 of file locking-selftest.c.
Definition at line 1032 of file locking-selftest.c.
Definition at line 1063 of file locking-selftest.c.
Definition at line 1067 of file locking-selftest.c.
Definition at line 1045 of file locking-selftest.c.
#define E | ( | ) |
Definition at line 528 of file locking-selftest.c.
#define E | ( | ) |
#define E | ( | ) |
#define E | ( | ) |
#define E | ( | ) |
#define E | ( | ) |
#define E | ( | ) |
#define E | ( | ) |
Definition at line 528 of file locking-selftest.c.
#define E | ( | ) |
#define E | ( | ) |
Definition at line 528 of file locking-selftest.c.
#define E1 | ( | ) |
Definition at line 862 of file locking-selftest.c.
#define E1 | ( | ) |
Definition at line 862 of file locking-selftest.c.
#define E1 | ( | ) |
Definition at line 862 of file locking-selftest.c.
#define E1 | ( | ) |
#define E1 | ( | ) |
Definition at line 862 of file locking-selftest.c.
#define E1 | ( | ) |
#define E1 | ( | ) |
Definition at line 862 of file locking-selftest.c.
#define E1 | ( | ) |
#define E2 | ( | ) |
Definition at line 871 of file locking-selftest.c.
#define E2 | ( | ) |
Definition at line 871 of file locking-selftest.c.
#define E2 | ( | ) |
Definition at line 871 of file locking-selftest.c.
#define E2 | ( | ) |
Definition at line 871 of file locking-selftest.c.
#define E2 | ( | ) |
Definition at line 871 of file locking-selftest.c.
#define E2 | ( | ) |
Definition at line 871 of file locking-selftest.c.
#define E2 | ( | ) |
Definition at line 871 of file locking-selftest.c.
#define E2 | ( | ) |
Definition at line 871 of file locking-selftest.c.
#define E3 | ( | ) |
Definition at line 876 of file locking-selftest.c.
#define E3 | ( | ) |
Definition at line 876 of file locking-selftest.c.
#define E3 | ( | ) |
Definition at line 876 of file locking-selftest.c.
#define E3 | ( | ) |
#define E3 | ( | ) |
Definition at line 876 of file locking-selftest.c.
#define FAILURE 0 |
Definition at line 38 of file locking-selftest.c.
#define GENERATE_PERMUTATIONS_2_EVENTS | ( | name | ) |
#define GENERATE_PERMUTATIONS_3_EVENTS | ( | name | ) |
Definition at line 212 of file locking-selftest.c.
#define GENERATE_TESTCASE | ( | name | ) |
Definition at line 203 of file locking-selftest.c.
#define HARDIRQ_DISABLE local_irq_disable |
Definition at line 141 of file locking-selftest.c.
#define HARDIRQ_ENABLE local_irq_enable |
Definition at line 142 of file locking-selftest.c.
#define HARDIRQ_ENTER | ( | ) |
Definition at line 144 of file locking-selftest.c.
#define HARDIRQ_EXIT | ( | ) |
Definition at line 149 of file locking-selftest.c.
#define I1 | ( | x | ) |
#define I2 | ( | x | ) |
#define I_MUTEX | ( | x | ) |
Definition at line 900 of file locking-selftest.c.
#define I_RWLOCK | ( | x | ) |
Definition at line 899 of file locking-selftest.c.
#define I_RWSEM | ( | x | ) |
Definition at line 901 of file locking-selftest.c.
#define I_SPINLOCK | ( | x | ) |
Definition at line 898 of file locking-selftest.c.
#define INIT_CLASS_FUNC | ( | class | ) |
Definition at line 108 of file locking-selftest.c.
Definition at line 171 of file locking-selftest.c.
Definition at line 196 of file locking-selftest.c.
#define LOCKTYPE_MUTEX 0x4 |
Definition at line 43 of file locking-selftest.c.
#define LOCKTYPE_RWLOCK 0x2 |
Definition at line 42 of file locking-selftest.c.
#define LOCKTYPE_RWSEM 0x8 |
Definition at line 44 of file locking-selftest.c.
#define LOCKTYPE_SPIN 0x1 |
Definition at line 41 of file locking-selftest.c.
#define MI | ( | x | ) | mutex_init(&mutex_##x) |
Definition at line 187 of file locking-selftest.c.
#define ML | ( | x | ) | mutex_lock(&mutex_##x) |
Definition at line 185 of file locking-selftest.c.
#define MU | ( | x | ) | mutex_unlock(&mutex_##x) |
Definition at line 186 of file locking-selftest.c.
Definition at line 180 of file locking-selftest.c.
Definition at line 192 of file locking-selftest.c.
Definition at line 193 of file locking-selftest.c.
#define RU | ( | x | ) | read_unlock(&rwlock_##x) |
Definition at line 181 of file locking-selftest.c.
#define RWI | ( | x | ) | rwlock_init(&rwlock_##x) |
Definition at line 183 of file locking-selftest.c.
#define RWSI | ( | x | ) | init_rwsem(&rwsem_##x) |
Definition at line 194 of file locking-selftest.c.
#define SI | ( | x | ) | spin_lock_init(&lock_##x) |
Definition at line 174 of file locking-selftest.c.
#define SOFTIRQ_DISABLE local_bh_disable |
Definition at line 153 of file locking-selftest.c.
#define SOFTIRQ_ENABLE local_bh_enable |
Definition at line 154 of file locking-selftest.c.
#define SOFTIRQ_ENTER | ( | ) |
Definition at line 156 of file locking-selftest.c.
#define SOFTIRQ_EXIT | ( | ) |
Definition at line 162 of file locking-selftest.c.
#define SUCCESS 1 |
Definition at line 39 of file locking-selftest.c.
Definition at line 172 of file locking-selftest.c.
#define WL | ( | x | ) | write_lock(&rwlock_##x) |
Definition at line 176 of file locking-selftest.c.
#define WSL | ( | x | ) | down_write(&rwsem_##x) |
Definition at line 189 of file locking-selftest.c.
Definition at line 190 of file locking-selftest.c.
#define WU | ( | x | ) | write_unlock(&rwlock_##x) |
Definition at line 177 of file locking-selftest.c.
__setup | ( | ) |
Definition at line 1112 of file locking-selftest.c.