summaryrefslogtreecommitdiffstats
path: root/sys/dev/vkbd/vkbd.c
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2006-02-27 06:17:48 +0000
committeremax <emax@FreeBSD.org>2006-02-27 06:17:48 +0000
commit9d9a1b681981bb28476a05f5b05c33a971d573db (patch)
treec6e93e2cfe7ec7f2e0ec503e0b588e2fc5982146 /sys/dev/vkbd/vkbd.c
parenteff5482a54136fa8ed5c1fa81130394f21ac9fa3 (diff)
downloadFreeBSD-src-9d9a1b681981bb28476a05f5b05c33a971d573db.zip
FreeBSD-src-9d9a1b681981bb28476a05f5b05c33a971d573db.tar.gz
Disable custom locking in the vkbd(4) for now and make it rely on the
Giant mutex (just like the rest of keyboard drivers and syscons(4) do). Tested by: markus MFC after: 1 day
Diffstat (limited to 'sys/dev/vkbd/vkbd.c')
-rw-r--r--sys/dev/vkbd/vkbd.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/sys/dev/vkbd/vkbd.c b/sys/dev/vkbd/vkbd.c
index b399726..7795318 100644
--- a/sys/dev/vkbd/vkbd.c
+++ b/sys/dev/vkbd/vkbd.c
@@ -1,6 +1,8 @@
-/*-
+/*
* vkbd.c
- *
+ */
+
+/*-
* Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com>
* All rights reserved.
*
@@ -64,6 +66,13 @@ MALLOC_DEFINE(M_VKBD, KEYBOARD_NAME, "Virtual AT keyboard");
*****************************************************************************
*****************************************************************************/
+/*
+ * XXX
+ * For now rely on Giant mutex to protect our data structures.
+ * Just like the rest of keyboard drivers and syscons(4) do.
+ */
+
+#if 0 /* not yet */
#define VKBD_LOCK_DECL struct mtx ks_lock
#define VKBD_LOCK_INIT(s) mtx_init(&(s)->ks_lock, "vkbd_lock", NULL, MTX_DEF|MTX_RECURSE)
#define VKBD_LOCK_DESTROY(s) mtx_destroy(&(s)->ks_lock)
@@ -72,6 +81,15 @@ MALLOC_DEFINE(M_VKBD, KEYBOARD_NAME, "Virtual AT keyboard");
#define VKBD_LOCK_ASSERT(s, w) mtx_assert(&(s)->ks_lock, w)
#define VKBD_SLEEP(s, f, d, t) \
msleep(&(s)->f, &(s)->ks_lock, PCATCH | (PZERO + 1), d, t)
+#else
+#define VKBD_LOCK_DECL
+#define VKBD_LOCK_INIT(s)
+#define VKBD_LOCK_DESTROY(s)
+#define VKBD_LOCK(s)
+#define VKBD_UNLOCK(s)
+#define VKBD_LOCK_ASSERT(s, w)
+#define VKBD_SLEEP(s, f, d, t) tsleep(&(s)->f, PCATCH | (PZERO + 1), d, t)
+#endif
#define VKBD_KEYBOARD(d) \
kbd_get_keyboard(kbd_find_keyboard(KEYBOARD_NAME, dev2unit(d)))
OpenPOWER on IntegriCloud