Lines Matching defs:locks
384 struct ww_mutex *locks;
435 struct ww_mutex *locks = stress->locks;
454 err = ww_mutex_lock(&locks[order[n]], &ctx);
462 ww_mutex_unlock(&locks[order[contended]]);
465 ww_mutex_unlock(&locks[order[n]]);
469 ww_mutex_lock_slow(&locks[order[contended]], &ctx);
493 LIST_HEAD(locks);
508 ll->lock = &stress->locks[order[n]];
509 list_add(&ll->link, &locks);
517 list_for_each_entry(ll, &locks, link) {
523 list_for_each_entry_continue_reverse(ln, &locks, link)
533 list_move(&ll->link, &locks); /* restarts iteration */
537 list_for_each_entry(ll, &locks, link)
544 list_for_each_entry_safe(ll, ln, &locks, link)
553 struct ww_mutex *lock = stress->locks + get_random_u32_below(nlocks);
576 struct ww_mutex *locks;
580 locks = kmalloc_array(nlocks, sizeof(*locks), GFP_KERNEL);
581 if (!locks)
587 kfree(locks);
592 ww_mutex_init(&locks[n], &ww_class);
621 stress->locks = locks;
632 ww_mutex_destroy(&locks[n]);
634 kfree(locks);