Lines Matching refs:index
462 static void __lh_lock(struct lock_history *lh, unsigned int index)
466 write_lock_bh(&lh->cache->trees[index].u.spinlock);
468 down_write(&lh->cache->trees[index].u.lock);
471 read_lock_bh(&lh->cache->trees[index].u.spinlock);
473 down_read(&lh->cache->trees[index].u.lock);
477 static void __lh_unlock(struct lock_history *lh, unsigned int index)
481 write_unlock_bh(&lh->cache->trees[index].u.spinlock);
483 up_write(&lh->cache->trees[index].u.lock);
486 read_unlock_bh(&lh->cache->trees[index].u.spinlock);
488 up_read(&lh->cache->trees[index].u.lock);
509 unsigned int index = cache_index(b, lh->no_previous); /* no_previous is num_locks */
512 if (lh->previous != index) {
514 __lh_lock(lh, index);
515 lh->previous = index;
518 __lh_lock(lh, index);
519 lh->previous = index;