From 3ea425911b3b1fac5c069dc3158fa324391c986e Mon Sep 17 00:00:00 2001 From: ad Date: Sun, 15 Jul 2007 15:27:53 +0000 Subject: [PATCH] The power daemon is now an LWP. --- sys/dev/sysmon/sysmon_power.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/sysmon/sysmon_power.c b/sys/dev/sysmon/sysmon_power.c index d778555f8a98..132a807b6c55 100644 --- a/sys/dev/sysmon/sysmon_power.c +++ b/sys/dev/sysmon/sysmon_power.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_power.c,v 1.19 2007/07/02 15:18:30 xtraeme Exp $ */ +/* $NetBSD: sysmon_power.c,v 1.20 2007/07/15 15:27:53 ad Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.19 2007/07/02 15:18:30 xtraeme Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.20 2007/07/15 15:27:53 ad Exp $"); #include "opt_compat_netbsd.h" #include @@ -91,12 +91,13 @@ __KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.19 2007/07/02 15:18:30 xtraeme Ex #include #include #include +#include #include static kmutex_t sysmon_power_event_queue_mtx; static kcondvar_t sysmon_power_event_queue_cv; -static struct proc *sysmon_power_daemon; +static struct lwp *sysmon_power_daemon; static prop_dictionary_t sysmon_power_dict; struct power_event_description { @@ -345,7 +346,7 @@ sysmonopen_power(dev_t dev, int flag, int mode, struct lwp *l) if (sysmon_power_daemon != NULL) error = EBUSY; else { - sysmon_power_daemon = l->l_proc; + sysmon_power_daemon = l; sysmon_power_event_queue_flush(); } mutex_exit(&sysmon_power_event_queue_mtx);