Don't lock when the debugger is running.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32072 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-08-03 11:54:25 +00:00
parent 885b7b4a85
commit 16357dea6b

View File

@ -344,13 +344,18 @@ _arch_debug_serial_putchar(const char c)
void
arch_debug_serial_putchar(const char c)
{
cpu_status state = disable_interrupts();
acquire_spinlock(&sSerialOutputSpinlock);
cpu_status state = 0;
if (!debug_debugger_running()) {
state = disable_interrupts();
acquire_spinlock(&sSerialOutputSpinlock);
}
_arch_debug_serial_putchar(c);
release_spinlock(&sSerialOutputSpinlock);
restore_interrupts(state);
if (!debug_debugger_running()) {
release_spinlock(&sSerialOutputSpinlock);
restore_interrupts(state);
}
}