Lines Matching refs:instance

131 #define	LI_RECURSEMASK	0x0000ffff	/* Recursion depth of lock instance. */
132 #define LI_EXCLUSIVE 0x00010000 /* Exclusive lock instance. */
190 * Lock instances. A lock instance is the data associated with a lock while
191 * it is held by witness. For example, a lock instance will hold the
357 static void witness_list_lock(struct lock_instance *instance,
1458 struct lock_instance *instance;
1475 instance = find_instance(*lock_list, lock);
1476 if (instance != NULL) {
1477 instance->li_flags++;
1480 instance->li_flags & LI_RECURSEMASK);
1481 instance->li_file = file;
1482 instance->li_line = line;
1490 /* Find the next open lock instance in the list and fill it. */
1501 instance = &lle->ll_children[lle->ll_count++];
1502 instance->li_lock = lock;
1503 instance->li_line = line;
1504 instance->li_file = file;
1506 instance->li_flags = LI_EXCLUSIVE;
1508 instance->li_flags = 0;
1516 struct lock_instance *instance;
1535 instance = find_instance(curthread->td_sleeplocks, lock);
1536 if (instance == NULL) {
1543 if ((instance->li_flags & LI_EXCLUSIVE) != 0)
1548 if ((instance->li_flags & LI_RECURSEMASK) != 0)
1552 instance->li_flags & LI_RECURSEMASK,
1555 instance->li_flags |= LI_EXCLUSIVE;
1562 struct lock_instance *instance;
1581 instance = find_instance(curthread->td_sleeplocks, lock);
1582 if (instance == NULL) {
1589 if ((instance->li_flags & LI_EXCLUSIVE) == 0)
1594 if ((instance->li_flags & LI_RECURSEMASK) != 0)
1598 instance->li_flags & LI_RECURSEMASK,
1601 instance->li_flags &= ~LI_EXCLUSIVE;
1608 struct lock_instance *instance;
1619 /* Find lock instance associated with this lock. */
1627 instance = &(*lock_list)->ll_children[i];
1628 if (instance->li_lock == lock)
1648 if ((instance->li_flags & LI_EXCLUSIVE) != 0 && witness_watch > 0 &&
1653 fixup_filename(instance->li_file), instance->li_line);
1656 if ((instance->li_flags & LI_EXCLUSIVE) == 0 && witness_watch > 0 &&
1661 fixup_filename(instance->li_file),
1662 instance->li_line);
1666 if ((instance->li_flags & LI_RECURSEMASK) > 0) {
1668 td->td_proc->p_pid, instance->li_lock->lo_name,
1669 instance->li_flags);
1670 instance->li_flags--;
1674 if ((instance->li_flags & LI_NORELEASE) != 0 && witness_watch > 0) {
1683 td->td_proc->p_pid, instance->li_lock->lo_name,
2186 struct lock_instance *instance;
2191 instance = &lle->ll_children[i];
2192 if (instance->li_lock == lock)
2193 return (instance);
2199 witness_list_lock(struct lock_instance *instance,
2204 lock = instance->li_lock;
2205 prnt("%s %s %s", (instance->li_flags & LI_EXCLUSIVE) != 0 ?
2210 instance->li_flags & LI_RECURSEMASK, lock,
2211 fixup_filename(instance->li_file), instance->li_line);
2288 * per-cpu data to try to find the lock instance for this spin lock to
2295 struct lock_instance *instance;
2301 instance = find_instance(pc->pc_spinlocks, lock);
2302 if (instance != NULL)
2303 witness_list_lock(instance, prnt);
2310 struct lock_instance *instance;
2331 instance = find_instance(lock_list, lock);
2332 if (instance == NULL) {
2337 *filep = instance->li_file;
2338 *linep = instance->li_line;
2345 struct lock_instance *instance;
2366 instance = find_instance(lock_list, lock);
2367 if (instance == NULL)
2372 if (instance == NULL)
2374 instance->li_file = file;
2375 instance->li_line = line;
2383 struct lock_instance *instance;
2390 instance = find_instance(curthread->td_sleeplocks, lock);
2392 instance = find_instance(PCPU_GET(spinlocks), lock);
2400 if (instance != NULL)
2414 if (instance == NULL) {
2421 (instance->li_flags & LI_EXCLUSIVE) == 0)
2427 (instance->li_flags & LI_EXCLUSIVE) != 0)
2433 (instance->li_flags & LI_RECURSEMASK) == 0)
2438 (instance->li_flags & LI_RECURSEMASK) != 0)
2455 struct lock_instance *instance;
2468 instance = find_instance(lock_list, lock);
2469 if (instance == NULL) {
2476 instance->li_flags |= flag;
2478 instance->li_flags &= ~flag;