projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
track number of simple locks
[unix-history]
/
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
0b3fe9e
..
69fe4ba
100644
(file)
--- a/
usr/src/sys/kern/kern_lock.c
+++ b/
usr/src/sys/kern/kern_lock.c
@@
-8,7
+8,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_lock.c 8.1
3
(Berkeley) %G%
+ * @(#)kern_lock.c 8.1
4
(Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
@@
-448,6
+448,8
@@
_simple_lock(alp, id, l)
}
}
alp->lock_data = 1;
}
}
alp->lock_data = 1;
+ if (curproc)
+ curproc->p_simple_locks++;
}
int
}
int
@@
-476,6
+478,8
@@
_simple_lock_try(alp, id, l)
return (0);
alp->lock_data = 1;
return (0);
alp->lock_data = 1;
+ if (curproc)
+ curproc->p_simple_locks++;
return (1);
}
return (1);
}
@@
-500,5
+504,7
@@
_simple_unlock(alp, id, l)
}
}
alp->lock_data = 0;
}
}
alp->lock_data = 0;
+ if (curproc)
+ curproc->p_simple_locks--;
}
#endif /* DEBUG && NCPUS == 1 */
}
#endif /* DEBUG && NCPUS == 1 */