summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-03-05 22:41:22 +0000
committerjhb <jhb@FreeBSD.org>2004-03-05 22:41:22 +0000
commit6ee273fcd7d5fd22582d9e17e8f6c3a085bb31ca (patch)
treebe458a769fb4d7c0586d9acf1a430b3aa063594d /sys
parent4e1bd1e348c9a2622101732b0325b1d374fef4d4 (diff)
downloadFreeBSD-src-6ee273fcd7d5fd22582d9e17e8f6c3a085bb31ca.zip
FreeBSD-src-6ee273fcd7d5fd22582d9e17e8f6c3a085bb31ca.tar.gz
Lock Giant around the body of the adlink_loran() function used by the
adlink device kthreads.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/adlink/adlink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/adlink/adlink.c b/sys/dev/adlink/adlink.c
index f8a7253..a66ccf5 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);
}
OpenPOWER on IntegriCloud