Subject: Re: NetBSD on Laptops...
To: Charles M. Hannum <firstname.lastname@example.org>
From: David Carrel <email@example.com>
Date: 04/18/1995 12:10:38
I've been thinking about this for a while now. It seems to me that true
APM needs to live both in the kernel and in user space. The kernel
provides the user-space programs access to the BIOS and access to drivers.
A privileged user space daemon would take care of things like resetting the
clock and syncing disks. Other unprivileged user space programs could
check the battery levels. But where I get lost is in deciding how the APM
driver should notify other drivers that a reset (or other action) is
appropriate. Maybe a registry where a driver could register a "before
suspend" function and an "after suspend" function and maybe several others.
On most machines these routines would never get called, but on machines
with APM and a running APM daemon, these routines would then get used. I'm
looking for ideas on a clean way to do this before I go crazy and implement
> I ported APM function from FreeBSD 2.0.
> Last I checked, the only thing that code actually accomplished was
> resetting the clock after a resume. While that's all fine and dandy,
> it misses a *lot*, and it was ugly too.
> The APM code really needs hooks for drivers to reset their state on
> resume, and to sync before shutdown.