diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1997-11-06 22:41:07 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 1997-11-06 22:41:07 +0000 |
commit | f6f720773d9c569b71220d37d8945ba6c462352b (patch) | |
tree | 9bfba5ce14e87f495105f1411e301fdcf39fd9b8 /sys/kern | |
parent | fe030272d978a79475b7d0861aaece450fc78bdb (diff) |
Fixes so that it compiles with #ifdef DEBUG
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_lock.c | 15 |
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 */ |