On 13-Oct-01 Dag-Erling Smorgrav wrote:
> Sheldon Hearn <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> -- 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to