-.\" $OpenBSD: lock.9,v 1.22 2014/07/09 14:16:10 guenther Exp $
+.\" $OpenBSD: lock.9,v 1.23 2015/01/11 19:34:52 guenther Exp $
.\" $NetBSD: lock.9,v 1.12 2001/11/01 01:13:43 wiz Exp $
.\"
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 9 2014 $
+.Dd $Mdocdate: January 11 2015 $
.Dt LOCK 9
.Os
.Sh NAME
It also allows upgrading a shared-access lock to an
exclusive-access lock, as well as downgrading an exclusive-access lock
to a shared-access lock.
-.Pp
-If the kernel option LOCKDEBUG is enabled, additional facilities
-are provided to record additional lock information.
-These facilities are provided to assist in determining deadlock occurrences.
.Sh FUNCTIONS
The functions which operate on locks are:
.Bl -tag -width Ds
-/* $OpenBSD: trap.c,v 1.119 2014/12/02 18:13:10 tedu Exp $ */
+/* $OpenBSD: trap.c,v 1.120 2015/01/11 19:34:52 guenther Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
case T_PAGEFLT: /* allow page faults in kernel mode */
if (p == 0 || p->p_addr == 0)
goto we_re_toast;
-#ifdef LOCKDEBUG
- /* If we page-fault while in scheduler, we're doomed. */
- if (__mp_lock_held(&sched_lock))
- goto we_re_toast;
-#endif
pcb = &p->p_addr->u_pcb;
#if 0
-/* $OpenBSD: sched.h,v 1.37 2014/10/17 01:51:39 tedu Exp $ */
+/* $OpenBSD: sched.h,v 1.38 2015/01/11 19:34:52 guenther Exp $ */
/* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */
/*-
yield(); \
} while (0)
-#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
+#if defined(MULTIPROCESSOR)
#include <sys/lock.h>
/*
splx(s); \
} while (/* CONSTCOND */ 0)
-#else /* ! MULTIPROCESSOR || LOCKDEBUG */
+#else /* ! MULTIPROCESSOR */
#define SCHED_ASSERT_LOCKED() splassert(IPL_SCHED);
#define SCHED_ASSERT_UNLOCKED() /* nothing */
#define SCHED_LOCK(s) s = splsched()
#define SCHED_UNLOCK(s) splx(s)
-#endif /* MULTIPROCESSOR || LOCKDEBUG */
+#endif /* MULTIPROCESSOR */
#endif /* _KERNEL */
#endif /* _SYS_SCHED_H_ */