mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 14:49:36 -04:00
- Fix a problem that slipped through review; the stack member of the lockmgr
structure should have the lk_ prefix. - Add stack_print(lkp->lk_stack) to the information printed with lockmgr_printinfo().
This commit is contained in:
parent
e8ddb61d38
commit
7499fd8de9
2 changed files with 9 additions and 6 deletions
|
|
@ -214,7 +214,7 @@ lockmgr(lkp, flags, interlkp, td)
|
|||
break;
|
||||
sharelock(td, lkp, 1);
|
||||
#if defined(DEBUG_LOCKS)
|
||||
stack_save(&lkp->stack);
|
||||
stack_save(&lkp->lk_stack);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ lockmgr(lkp, flags, interlkp, td)
|
|||
lkp->lk_exclusivecount = 1;
|
||||
COUNT(td, 1);
|
||||
#if defined(DEBUG_LOCKS)
|
||||
stack_save(&lkp->stack);
|
||||
stack_save(&lkp->lk_stack);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ lockmgr(lkp, flags, interlkp, td)
|
|||
lkp->lk_exclusivecount = 1;
|
||||
COUNT(td, 1);
|
||||
#if defined(DEBUG_LOCKS)
|
||||
stack_save(&lkp->stack);
|
||||
stack_save(&lkp->lk_stack);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
|
@ -401,7 +401,7 @@ lockmgr(lkp, flags, interlkp, td)
|
|||
lkp->lk_exclusivecount = 1;
|
||||
COUNT(td, 1);
|
||||
#if defined(DEBUG_LOCKS)
|
||||
stack_save(&lkp->stack);
|
||||
stack_save(&lkp->lk_stack);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
|
@ -495,7 +495,7 @@ lockinit(lkp, prio, wmesg, timo, flags)
|
|||
lkp->lk_lockholder = LK_NOPROC;
|
||||
lkp->lk_newlock = NULL;
|
||||
#ifdef DEBUG_LOCKS
|
||||
stack_zero(&lkp->stack);
|
||||
stack_zero(&lkp->lk_stack);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -565,4 +565,7 @@ lockmgr_printinfo(lkp)
|
|||
lkp->lk_lockholder, lkp->lk_lockholder->td_proc->p_pid);
|
||||
if (lkp->lk_waitcount > 0)
|
||||
printf(" with %d pending", lkp->lk_waitcount);
|
||||
#ifdef DEBUG_LOCKS
|
||||
stack_print(&lkp->lk_stack);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ struct lock {
|
|||
struct thread *lk_lockholder; /* thread of exclusive lock holder */
|
||||
struct lock *lk_newlock; /* lock taking over this lock */
|
||||
#ifdef DEBUG_LOCKS
|
||||
struct stack stack;
|
||||
struct stack lk_stack;
|
||||
#endif
|
||||
};
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue