diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-11-06 11:35:16 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-11-06 11:35:16 +0000 |
commit | 708a703a2d415eaf1b4f2c6da2264a300a4bc430 (patch) | |
tree | caccc179cec2a66d901016d39d47c33663432e5c /sys | |
parent | f611c535402375ea412b4957d4a28e9da462a0f4 (diff) |
force a new sensor task to be run as soon as possible. previously it used
to have to wait its timeout before the first run, which led to some
weird values or states being visible after boot, but before the first
update.
for jolan@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sensors.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_sensors.c b/sys/kern/kern_sensors.c index 784b3280c97..a01eedf108b 100644 --- a/sys/kern/kern_sensors.c +++ b/sys/kern/kern_sensors.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sensors.c,v 1.14 2006/05/28 16:43:50 mk Exp $ */ +/* $OpenBSD: kern_sensors.c,v 1.15 2006/11/06 11:35:15 dlg Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -121,7 +121,8 @@ sensor_task_register(void *arg, void (*func)(void *), int period) if (TAILQ_EMPTY(&tasklist)) kthread_create_deferred(sensor_task_create, NULL); - sensor_task_schedule(st); + st->nextrun = 0; + TAILQ_INSERT_HEAD(&tasklist, st, entry); wakeup(&tasklist); return (0); |