From 12dd6da62c8dcd06a0b3c408c81b25edcbb3bf9e Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 5 Mar 2004 22:41:22 +0000 Subject: Lock Giant around the body of the adlink_loran() function used by the adlink device kthreads. --- sys/dev/adlink/adlink.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/dev/adlink') diff --git a/sys/dev/adlink/adlink.c b/sys/dev/adlink/adlink.c index f8a7253f6cc3..a66ccf5ac330 100644 --- a/sys/dev/adlink/adlink.c +++ b/sys/dev/adlink/adlink.c @@ -221,6 +221,7 @@ adlink_loran(void *arg) sc = arg; idx = 0; + mtx_lock(&Giant); for (;;) { while (sc->stat[idx] == 0) msleep(sc, NULL, PRIBIO, "loran", 1); @@ -234,6 +235,7 @@ adlink_loran(void *arg) idx++; idx %= NRING; } + mtx_unlock(&Giant); kthread_exit(0); } -- cgit v1.3