[haiku-development] Re: Jamming in debugging info?

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 15 Jul 2009 14:00:35 +0200 CEST

Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> The only problem I know of, is that dprintf() must not be called with 
> interrupts disabled, since it potentially writes to a port. That only 
> triggers a panic though and doesn't cause any weird crashes. 
> dprintf_no_syslog() should be used in respective places.

Actually, dprintf() does not write to a port itself, and is generally 
safe to be called with interrupts disabled *unless* you also hold 
certain spinlocks.
dprintf_no_syslog() should be used in disk drivers and related things, 
to prevent endless loops (as every dprintf() will trigger a write to 
the syslog sooner or later, at least if the syslog output is enabled 
which it is by default).

Bye,
   Axel.


Other related posts: