Date: Wed, 25 Oct 1995 21:41:46 +1000 From: Bruce Evans <bde@zeta.org.au> To: hackers@freebsd.org, msmith@atrad.adelaide.edu.au Subject: Re: Debugging interrupt service routines... Message-ID: <199510251141.VAA00368@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510251141.VAA00368>