Date: Mon, 15 Oct 2001 15:21:47 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Dag-Erling Smorgrav <des@ofug.org> Cc: freebsd-current@FreeBSD.ORG, Doug Barton <DougB@DougBarton.net>, Sheldon Hearn <sheldonh@starjuice.net> Subject: Re: Strike three, you're out Message-ID: <XFMail.011015152147.jhb@FreeBSD.org> In-Reply-To: <xzpd73rh4tw.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On 13-Oct-01 Dag-Erling Smorgrav wrote: > Sheldon Hearn <sheldonh@starjuice.net> writes: >> Perhaps the analogous solution is to be more careful about the use of >> printf() in the kernel? Perhaps a similar approach as is used in >> userland signal handlers should be taken, where a flag is set and later >> the printf() is performed conditional on the state of the flag? > > I think the correct approach would be for printf() to store the > printed text in a circular buffer if it detected that printing it > would cause a locking violation, and for some other part of the kernel > to check and empty the circular buffer regularly, in a safe context. Something like that, yes. Chuck Paterson has patches to do all this for our printf() if I can extract them. It basically ends up with 3 different versions of printf in the kernel. I'll see if I can't get ahold of them. -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011015152147.jhb>