kern_lock.c (0412a333) | kern_lock.c (ae8e83e6) |
---|---|
1/* 2 * Copyright (c) 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Copyright (C) 1997 6 * John S. Dyson. All rights reserved. 7 * 8 * This code contains ideas from software contributed to Berkeley by --- 381 unchanged lines hidden (view full) --- 390 COUNT(td, 1); 391 break; 392 393 case LK_RELEASE: 394 if (lkp->lk_exclusivecount != 0) { 395 if (lkp->lk_lockholder != td && 396 lkp->lk_lockholder != LK_KERNTHREAD) { 397 spin_unlock_wr(&lkp->lk_spinlock); | 1/* 2 * Copyright (c) 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Copyright (C) 1997 6 * John S. Dyson. All rights reserved. 7 * 8 * This code contains ideas from software contributed to Berkeley by --- 381 unchanged lines hidden (view full) --- 390 COUNT(td, 1); 391 break; 392 393 case LK_RELEASE: 394 if (lkp->lk_exclusivecount != 0) { 395 if (lkp->lk_lockholder != td && 396 lkp->lk_lockholder != LK_KERNTHREAD) { 397 spin_unlock_wr(&lkp->lk_spinlock); |
398 panic("lockmgr: pid %d, not %s thr %p unlocking", 399 (td->td_proc ? td->td_proc->p_pid : -99), | 398 panic("lockmgr: pid %d, not %s thr %p/%p unlocking", 399 (td->td_proc ? td->td_proc->p_pid : -1), |
400 "exclusive lock holder", | 400 "exclusive lock holder", |
401 lkp->lk_lockholder); | 401 td, lkp->lk_lockholder); |
402 } 403 if (lkp->lk_lockholder != LK_KERNTHREAD) { 404 COUNT(td, -1); 405 } 406 if (lkp->lk_exclusivecount == 1) { 407 lkp->lk_flags &= ~LK_HAVE_EXCL; 408 lkp->lk_lockholder = LK_NOTHREAD; 409 lkp->lk_exclusivecount = 0; --- 195 unchanged lines hidden --- | 402 } 403 if (lkp->lk_lockholder != LK_KERNTHREAD) { 404 COUNT(td, -1); 405 } 406 if (lkp->lk_exclusivecount == 1) { 407 lkp->lk_flags &= ~LK_HAVE_EXCL; 408 lkp->lk_lockholder = LK_NOTHREAD; 409 lkp->lk_exclusivecount = 0; --- 195 unchanged lines hidden --- |