summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-02-08 17:56:04 +0000
committerrwatson <rwatson@FreeBSD.org>2005-02-08 17:56:04 +0000
commite90b04ef14b93b89e8bbedc0bb3c35add6bf90c0 (patch)
tree4c5b5ab2ac18f5a408d74d0d3905b719e71df4db
parentbebecbae46c88543927df7d7231551fbf5aed11f (diff)
downloadFreeBSD-src-e90b04ef14b93b89e8bbedc0bb3c35add6bf90c0.zip
FreeBSD-src-e90b04ef14b93b89e8bbedc0bb3c35add6bf90c0.tar.gz
Simplify the "and if we're in the debugger, don't use locks" logic,
correcting some misthinking. Discussed with (really this time): bde
-rw-r--r--sys/dev/sio/sio.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 65b1029..2a9240b 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -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);
}
OpenPOWER on IntegriCloud