mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-15 15:06:42 +00:00
Simplify the "and if we're in the debugger, don't use locks" logic,
correcting some misthinking. Discussed with (really this time): bde
This commit is contained in:
parent
83f15706ef
commit
78e21ab011
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141530
@ -2583,20 +2583,16 @@ siocnputc(struct consdev *cd, int c)
|
||||
}
|
||||
s = spltty();
|
||||
need_unlock = 0;
|
||||
if (!kdb_active) {
|
||||
if (sio_inited == 2 && !mtx_owned(&sio_lock)) {
|
||||
mtx_lock_spin(&sio_lock);
|
||||
need_unlock = 1;
|
||||
}
|
||||
if (!kdb_active && sio_inited == 2 && !mtx_owned(&sio_lock)) {
|
||||
mtx_lock_spin(&sio_lock);
|
||||
need_unlock = 1;
|
||||
}
|
||||
siocnopen(&sp, iobase, speed);
|
||||
siocntxwait(iobase);
|
||||
outb(iobase + com_data, c);
|
||||
siocnclose(&sp, iobase);
|
||||
if (!kdb_active) {
|
||||
if (need_unlock)
|
||||
mtx_unlock_spin(&sio_lock);
|
||||
}
|
||||
if (need_unlock)
|
||||
mtx_unlock_spin(&sio_lock);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user