summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_lock.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index c6793d24f58..bf77d0b4a8a 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -52,11 +52,15 @@ void playback_stacktrace __P((int *, int));
* Locks provide shared/exclusive sychronization.
*/
+#if 0
#ifdef DEBUG
#define COUNT(p, x) if (p) (p)->p_locks += (x)
#else
#define COUNT(p, x)
#endif
+#endif
+
+#define COUNT(p, x)
#if NCPUS > 1
@@ -470,7 +474,7 @@ _simple_lock(alp, id, l)
const char *id;
int l;
{
-
+#if 0
if (simplelockrecurse)
return;
if (alp->lock_data == 1) {
@@ -486,17 +490,22 @@ _simple_lock(alp, id, l)
printf(" continuing\n");
}
}
+
alp->lock_data = 1;
+
if (curproc)
curproc->p_simple_locks++;
+#endif
}
+
int
_simple_lock_try(alp, id, l)
__volatile struct simplelock *alp;
const char *id;
int l;
{
+#if 0
if (alp->lock_data)
return (0);
@@ -505,6 +514,7 @@ _simple_lock_try(alp, id, l)
alp->lock_data = 1;
if (curproc)
curproc->p_simple_locks++;
+#endif
return (1);
}
@@ -514,7 +524,7 @@ _simple_unlock(alp, id, l)
const char *id;
int l;
{
-
+#if 0
if (simplelockrecurse)
return;
if (alp->lock_data == 0) {
@@ -533,5 +543,6 @@ _simple_unlock(alp, id, l)
alp->lock_data = 0;
if (curproc)
curproc->p_simple_locks--;
+#endif
}
#endif /* DEBUG && NCPUS == 1 */