diff options
| author | martin <martin@NetBSD.org> | 2015-04-28 11:58:49 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2015-04-28 11:58:49 +0000 |
| commit | 558c0290e7d8ba172f6171e56a8a2830e8ce035e (patch) | |
| tree | 049851a716df94805ae8c7447b910f5a0d42ad7f /sys/dev/sysmon | |
| parent | 7715dd6b7e055ba91fcdebf6e6fdb1172be9adf2 (diff) | |
sysmon_task_queue_sched needs to RUN_ONCE(tq_preinit) as well, it can
be called from sysmon_envsys_register() early.
Diffstat (limited to 'sys/dev/sysmon')
| -rw-r--r-- | sys/dev/sysmon/sysmon_taskq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/sysmon/sysmon_taskq.c b/sys/dev/sysmon/sysmon_taskq.c index 6a33b30f9cc..079e305dd7d 100644 --- a/sys/dev/sysmon/sysmon_taskq.c +++ b/sys/dev/sysmon/sysmon_taskq.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_taskq.c,v 1.18 2015/04/27 07:51:28 pgoyette Exp $ */ +/* $NetBSD: sysmon_taskq.c,v 1.19 2015/04/28 11:58:49 martin Exp $ */ /* * Copyright (c) 2001, 2003 Wasabi Systems, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_taskq.c,v 1.18 2015/04/27 07:51:28 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_taskq.c,v 1.19 2015/04/28 11:58:49 martin Exp $"); #include <sys/param.h> #include <sys/malloc.h> @@ -212,6 +212,8 @@ sysmon_task_queue_sched(u_int pri, void (*func)(void *), void *arg) { struct sysmon_task *st, *lst; + (void)RUN_ONCE(&once_tq, tq_preinit); + if (sysmon_task_queue_lwp == NULL) aprint_debug("WARNING: Callback scheduled before sysmon " "task queue thread present\n"); |
