From owner-freebsd-hackers Wed Oct 25 05:03:21 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id FAA10885 for hackers-outgoing; Wed, 25 Oct 1995 05:03:21 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id FAA10877 for ; Wed, 25 Oct 1995 05:03:15 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id VAA00368; Wed, 25 Oct 1995 21:41:46 +1000 Date: Wed, 25 Oct 1995 21:41:46 +1000 From: Bruce Evans Message-Id: <199510251141.VAA00368@godzilla.zeta.org.au> To: hackers@freebsd.org, msmith@atrad.adelaide.edu.au Subject: Re: Debugging interrupt service routines... Sender: owner-hackers@freebsd.org Precedence: bulk >Can someone give me a definite 'yes' or 'no' to >"Is it safe to call printf() in the kernel from an interrupt handler?" It isn't safe, but we do it anyway. Suppose syscons is doing some critical operation and you interrupt it and print something. Who can say what might happen? Even ddb uses ordinary console output although it has its own printf routine (it doesn't really need one - printf itself is reentrant). The serial console i/o routines are simpler and can't crash the system due to interference with ordinary serial i/o AFAIK. Bruce