Default lock_printf to syslog rather than printf. Some of the lock debug checks

are done inside of wakeup which is holding the sched lock. Printf can cause
wakeup to get called again (pty redirection of console message) which will
panic with sched lock already held.

This isn't a long term fix as not being able to printf vs. sched lock should
be cleaned up better but this avoids continual panics with lockdebug running
and an xterm -C.
This commit is contained in:
jmc 2000-12-24 23:56:24 +00:00
parent 6e076acf2e
commit ca607b87cf

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_lock.c,v 1.50 2000/11/22 06:31:23 thorpej Exp $ */
/* $NetBSD: kern_lock.c,v 1.51 2000/12/24 23:56:24 jmc Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@ -101,7 +101,7 @@
void lock_printf(const char *fmt, ...)
__attribute__((__format__(__printf__,1,2)));
int lock_debug_syslog = 0; /* defaults to printf, but can be patched */
int lock_debug_syslog = 1; /* defaults to syslog, but can be patched */
#endif
/*