From owner-cvs-src@FreeBSD.ORG Wed Oct 19 04:48:44 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD00D16A420; Wed, 19 Oct 2005 04:48:44 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 809E943D45; Wed, 19 Oct 2005 04:48:44 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9J4mi6f044473; Wed, 19 Oct 2005 04:48:44 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9J4miSB044472; Wed, 19 Oct 2005 04:48:44 GMT (envelope-from njl) Message-Id: <200510190448.j9J4miSB044472@repoman.freebsd.org> From: Nate Lawson Date: Wed, 19 Oct 2005 04:48:44 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.sbin/powerd Makefile powerd.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 04:48:44 -0000 njl 2005-10-19 04:48:44 UTC FreeBSD src repository Modified files: usr.sbin/powerd Makefile powerd.c Log: Use a pipe for reading devd events as another method of getting the AC line status. Add a thread that waits for events on the named pipe instead of polling the line status via apm or the ACPI sysctl. Additionally, use robust error handling in case devd goes away or we temporarily can't set a frequency (i.e., passive cooling has preempted our setting). Later, this should be improved so that if adaptive control is not being used, we will block while waiting for AC line events, saving a little CPU. Submitted by: Frederik Lindberg Revision Changes Path 1.4 +1 -0 src/usr.sbin/powerd/Makefile 1.13 +178 -28 src/usr.sbin/powerd/powerd.c