sysmon_task_queue_sched needs to RUN_ONCE(tq_preinit) as well, it can
be called from sysmon_envsys_register() early.
This commit is contained in:
parent
8bcb30da14
commit
7bd37d6abf
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue