From owner-acpi-jp@jp.FreeBSD.org Sun Nov 10 04:22:47 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id gA9JMll33724;
	Sun, 10 Nov 2002 04:22:47 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from axe-inc.co.jp (axegw.axe-inc.co.jp [61.199.217.66])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id gA9JMkm33719
	for <acpi-jp@jp.FreeBSD.org>; Sun, 10 Nov 2002 04:22:46 +0900 (JST)
	(envelope-from takawata@axe-inc.co.jp)
Received: from localhost.axe-inc.co.jp (localhost.axe-inc.co.jp [127.0.0.1])
	by axe-inc.co.jp (8.9.3+3.2W/3.7W) with SMTP id EAA09939;
	Sun, 10 Nov 2002 04:22:45 +0900 (JST)
Message-Id: <200211091922.EAA09939@axe-inc.co.jp>
X-Authentication-Warning: axegw.axe-inc.co.jp: localhost.axe-inc.co.jp [127.0.0.1] didn't use HELO protocol
To: acpi-jp@jp.FreeBSD.org
Cc: current@freebsd.org, Frode Nordahl <frode@nordahl.net>
In-reply-to: Your message of "Fri, 08 Nov 2002 14:40:59 PST."
             <3DCC3D7B.F062FFA3@mindspring.com>
From: Takanori Watanabe <takawata@axe-inc.co.jp>
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Sun, 10 Nov 2002 04:22:45 +0900
X-Sequence: acpi-jp 1932
Subject: [acpi-jp 1932] Re: acpid implementation?
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: takawata@axe-inc.co.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+021107

In message <3DCC3D7B.F062FFA3@mindspring.com>, Terry Lambert wrote:
>Hiten Pandya wrote:
>> > I have been searching mailing lists and my friend Google for information
>> > about a acpid (like apmd) implementation for FreeBSD, but I have found
>> > nothing.
>> >
>> > Does one exist anywhere, or has anyone started out on something without
>> > telling anyone? :)
>> 
>> Why do you need an acpid?
>
>Power profiles, for one.

It is obious there will be good if we have a way to catch power 
event from userland.

I have some ideas to implement it.
One way is implement with kqueue(2) and /dev/acpi to
get power events. This way does not require daemons
to wait the event exclusively. Each process that requires
to get power event can handle it by the interface.
I wrote the experimental code a years ago.


Next way is that make /dev/acpictl node that can open
exclusively and catch the power event by it, like apmd.

The last way is that extend /dev/devctl interface and
devd(8) that can handle power event.
