aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/xen/console
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2009-05-11 23:03:15 +0000
committerKip Macy <kmacy@FreeBSD.org>2009-05-11 23:03:15 +0000
commit673d9d33eb50b27551fed81d603dcd2a52fd6f4f (patch)
tree8858e0b3a2a24c2be9e33c195b399996ca30024f /sys/dev/xen/console
parent94a24e42409ec994d902a4d95521d6898cb3fb2a (diff)
Notes
Diffstat (limited to 'sys/dev/xen/console')
-rw-r--r--sys/dev/xen/console/console.c2
-rw-r--r--sys/dev/xen/console/xencons_ring.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/xen/console/console.c b/sys/dev/xen/console/console.c
index 5e14d486b5de..5c16b1f5ff29 100644
--- a/sys/dev/xen/console/console.c
+++ b/sys/dev/xen/console/console.c
@@ -287,8 +287,10 @@ xencons_rx(char *buf, unsigned len)
ttydisc_rint_done(tp);
tty_unlock(tp);
} else {
+ CN_LOCK(cn_mtx);
for (i = 0; i < len; i++)
rbuf[RBUF_MASK(rp++)] = buf[i];
+ CN_UNLOCK(cn_mtx);
}
}
diff --git a/sys/dev/xen/console/xencons_ring.c b/sys/dev/xen/console/xencons_ring.c
index a86ec5e9c2c4..077d286f3fe0 100644
--- a/sys/dev/xen/console/xencons_ring.c
+++ b/sys/dev/xen/console/xencons_ring.c
@@ -94,7 +94,8 @@ xencons_handle_input(void *unused)
cons = intf->in_cons;
prod = intf->in_prod;
-
+ CN_UNLOCK(cn_mtx);
+
/* XXX needs locking */
while (cons != prod) {
xencons_rx(intf->in + MASK_XENCONS_IDX(cons, intf->in), 1);
@@ -104,6 +105,7 @@ xencons_handle_input(void *unused)
mb();
intf->in_cons = cons;
+ CN_LOCK(cn_mtx);
notify_remote_via_evtchn(xen_start_info->console_evtchn);
xencons_tx();