X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/bb2e8bfa08921293e5ad94a008540bffccaf7203..8555d1e45facda5bac2f8b6e03c210a460ec8c30:/usr/src/sys/kern/kern_lock.c diff --git a/usr/src/sys/kern/kern_lock.c b/usr/src/sys/kern/kern_lock.c index 0b3fe9e008..69fe4baab6 100644 --- a/usr/src/sys/kern/kern_lock.c +++ b/usr/src/sys/kern/kern_lock.c @@ -8,7 +8,7 @@ * * %sccs.include.redist.c% * - * @(#)kern_lock.c 8.13 (Berkeley) %G% + * @(#)kern_lock.c 8.14 (Berkeley) %G% */ #include @@ -448,6 +448,8 @@ _simple_lock(alp, id, l) } } alp->lock_data = 1; + if (curproc) + curproc->p_simple_locks++; } int @@ -476,6 +478,8 @@ _simple_lock_try(alp, id, l) return (0); alp->lock_data = 1; + if (curproc) + curproc->p_simple_locks++; return (1); } @@ -500,5 +504,7 @@ _simple_unlock(alp, id, l) } } alp->lock_data = 0; + if (curproc) + curproc->p_simple_locks--; } #endif /* DEBUG && NCPUS == 1 */