Merged from sys/dev/sio/sio.c revision 1.458.

This commit is contained in:
Yoshihiro Takahashi 2005-02-11 03:41:34 +00:00
parent 88d8970dea
commit 179c6e9063
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141678
2 changed files with 10 additions and 18 deletions

View File

@ -3763,20 +3763,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);
}

View File

@ -3763,20 +3763,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);
}