summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2002-02-25 02:21:22 +0000
committermsmith <msmith@FreeBSD.org>2002-02-25 02:21:22 +0000
commite99d5bcb36683782c709466970e46e5dd962eac5 (patch)
tree6af39f20b940d74387167ecd77b421b5b0f16086 /sys/dev
parent809bbfd246c51497535a257596a077745e722fb8 (diff)
downloadFreeBSD-src-e99d5bcb36683782c709466970e46e5dd962eac5.zip
FreeBSD-src-e99d5bcb36683782c709466970e46e5dd962eac5.tar.gz
The thermal thread needs to take Giant before it does anything with the
interpreter. Submitted by: Magnus B{ckstr|m <b@etek.chalmers.se>
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi_thermal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index 709e133..92902af 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -31,6 +31,8 @@
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/kthread.h>
+#include <sys/lock.h>
+#include <sys/mutex.h>
#include <sys/bus.h>
#include <sys/proc.h>
#include <sys/reboot.h>
@@ -780,6 +782,8 @@ acpi_tz_thread(void *arg)
for (;;) {
tsleep(&acpi_tz_proc, PZERO, "nothing", hz * acpi_tz_polling_rate);
+ mtx_lock(&Giant);
+
if (devcount == 0)
devclass_get_devices(acpi_tz_devclass, &devs, &devcount);
@@ -787,5 +791,7 @@ acpi_tz_thread(void *arg)
for (i = 0; i < devcount; i++)
acpi_tz_timeout(device_get_softc(devs[i]));
ACPI_UNLOCK;
+
+ mtx_unlock(&Giant);
}
}
OpenPOWER on IntegriCloud