Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Oct 2001 18:35:40 +0200
From:      Sheldon Hearn <sheldonh@starjuice.net>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        Doug Barton <DougB@DougBarton.net>, freebsd-current@FreeBSD.ORG
Subject:   Re: Strike three, you're out 
Message-ID:  <23451.1002990940@axl.seasidesoftware.co.za>
In-Reply-To: Your message of "13 Oct 2001 16:06:16 %2B0200." <xzp8zefiqhz.fsf@flood.ping.uio.no> 

next in thread | previous in thread | raw e-mail | index | archive | help


On 13 Oct 2001 16:06:16 +0200, Dag-Erling Smorgrav wrote:

> It's very difficult to fix.  The problem is that printf() is used in
> the strangest parts of the deepest bowels of the kernel, but if a
> process grabs the console with TIOCCONS, printing something to the
> console causes the process that grabbed it to be woken up, which is a
> bad idea if, for instance, printf() was called from within mi_switch()
> (as is the case for those "microuptime() went backwards" messages).

This sounds analogous to the problems one encounters with printf(3)
(library function) inside signal handlers.

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?

Ciao,
Sheldon.

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?23451.1002990940>