ww_class
extern struct ww_class reservation_ww_class;
struct ww_class *ww_class)
ww_mutex_base_init(&lock->base, ww_class->mutex_name, &ww_class->mutex_key);
lock->ww_class = ww_class;
struct ww_class *ww_class)
ctx->stamp = atomic_long_inc_return_relaxed(&ww_class->stamp);
ctx->is_wait_die = ww_class->is_wait_die;
ctx->ww_class = ww_class;
lockdep_init_map(&ctx->dep_map, ww_class->acquire_name,
&ww_class->acquire_key, 0);
lockdep_init_map_wait(&ctx->first_lock_dep_map, ww_class->mutex_name,
&ww_class->mutex_key, 0, LD_WAIT_SLEEP);
struct ww_class *ww_class;
struct ww_class *ww_class;
#define __WW_CLASS_INITIALIZER(ww_class, _is_wait_die) \
, .acquire_name = #ww_class "_acquire" \
, .mutex_name = #ww_class "_mutex" \
struct ww_class classname = __WW_CLASS_INITIALIZER(classname, 1)
struct ww_class classname = __WW_CLASS_INITIALIZER(classname, 0)
static int test_mutex(struct ww_class *class)
static int test_aa(struct ww_class *class, bool trylock)
static DEFINE_WW_CLASS(ww_class);
struct ww_class *class;
static int test_abba(struct ww_class *class, bool trylock, bool resolve)
struct ww_class *class;
static int __test_cycle(struct ww_class *class, unsigned int nthreads)
static int test_cycle(struct ww_class *class, unsigned int ncpus)
struct ww_class *class;
static int stress(struct ww_class *class, int nlocks, int nthreads, unsigned int flags)
static int __test_mutex(struct ww_class *class, unsigned int flags)
static int run_tests(struct ww_class *class)
ret = run_tests(&ww_class);
DEBUG_LOCKS_WARN_ON(ww_ctx->ww_class != ww->ww_class);
t.ww_class = NULL;
static DEFINE_WD_CLASS(ww_class);
ww_acquire_init(&ctx, &ww_class);