Commit Graph

31 Commits

Author SHA1 Message Date
cube
c271a0dea6 According to acpi_acad.c and powerd(8), PRESSED event for AC adapter device
means it gets connected.  It feels odd to be told the AC adapter went
offline right after plugging it in.
2004-05-22 11:32:50 +00:00
kochi
1bc204dbcc Add AC adapter event type. 2004-05-03 07:43:37 +00:00
simonb
b6abb6ab1d Remove some assigned-to but otherwise unused variables. 2003-10-30 01:58:17 +00:00
christos
5d43dc85d6 Rename the thread command name so that it fits on top's display. 2003-09-06 23:28:30 +00:00
yamt
44d0d57217 do wakeup() only when someone is waiting for us. 2003-08-11 15:07:14 +00:00
yamt
104f2a80df introduce SME_FLAG_BUSY and set it during operations
instead of keeping sysmon_envsys_list_slock spinlock held
because some drivers might sleep in sysmon_envsys ops,

XXX sysmon_envsys_lock is now redundant
2003-08-11 14:24:41 +00:00
lukem
365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
kochi
620bc11015 Fix a locking problem, which closes kern/21607.
ok'd by Jason Thorpe.
2003-05-19 23:24:55 +00:00
fvdl
beed0b1c91 Fix format / number of argument mismatch for a printf. 2003-05-11 18:52:39 +00:00
thorpej
4bbda47b54 Add a "reset button" type. 2003-04-20 20:48:27 +00:00
thorpej
d14efd22d1 Generic "task queue" for sysmon back-ends. This provides a thread
context for callbacks that require it in order to handle sysmon-related
events.

Adapted from the "OsdSchedule" bits of the ACPI code.
2003-04-20 20:20:35 +00:00
thorpej
5a20f4be3c * Add a generic power management event API, defined in <sys/power.h>.
Right now, only power switch state change events are supported.  This
  is a work-in-progress.
* Add support to sysmon for delivering power mangement events to userland.
  Add poll, kqueue, and read entry points to sysmon.
* Adapt ACPI to use the new generic <sys/power.h> event types.

This provides the kernel support for a forthcoming powerd(8) which can
do nice things like gracefully shut the system down when an ACPI power
button is pressed.
2003-04-18 01:31:34 +00:00
thorpej
b0f79c65ce Start at a power management framework for sysmon. Right now we just
provide some VERY basic support for power/sleep buttons and lid switches;
if someone presses the power button, shut down the system semi-gracefully.

Eventually, we will send events for all types of button/lid events down
to a userland power management daemon, which will be able to define a
separate policy for each button/switch.
2003-04-17 01:02:21 +00:00
thorpej
a5bb7e6494 Group things in this file a bit more logically. 2003-04-10 18:04:20 +00:00
thorpej
89ef67a28c Nothing cares about NSYSMON anymore; delete it. 2002-12-31 22:47:48 +00:00
explorer
59e0238f99 add envsys support to acpi A/C adapter and batteries. This is still a work
in progress, much like the rest of ACPI.
2002-12-31 05:26:56 +00:00
explorer
89f72704d1 remove redundant defines 2002-12-30 06:16:10 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
kristerw
d509ae30db Correct possible return of uninitialized error variable. 2002-10-06 09:48:29 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
simonb
10f735a013 Fix WDOGIOC_GTICKLER for userland ticklers. 2002-07-31 06:48:58 +00:00
thorpej
20ddfbf4c1 Move sysmon configuration definitions to dev/sysmon/files.sysmon. 2002-04-16 21:00:27 +00:00
jdolecek
57b53bc9a8 The device close routine is called when _last_ descriptor to the
device file is closed, rather on every descriptor close. Instead of
getting the exclusive lock on open and releasing on close, get
the lock only when needed in sysmonioctl_envsys().
Fixes kern/14368 by Anthony Mallet. Okayed by Jason Thorpe.

While here, also inline sysmon_envsys_init() to sysmonopen_envsys(),
and g/c sysmonioctl_wdog() prototype.
2002-01-03 22:35:53 +00:00
lukem
640249d1e9 add RCSIDs 2001-11-13 06:28:55 +00:00
thorpej
4e7ff09e27 Make sure to clear sysmon_armed_wdog once the watchdog timer
is disarmed.
2001-01-30 22:24:31 +00:00
thorpej
e67f5e66bc Split the envsys and watchdog parts of sysmon into their own
files.
2000-11-05 04:06:13 +00:00
thorpej
c48d521bdb Add a watchog timer framework to the system monitor. 2000-11-04 18:37:19 +00:00
thorpej
e24d6ebc19 Fix a couple of brain-o's in error cases, and use PCATCH for
the sysmon mutex wait.
2000-06-28 06:51:17 +00:00
thorpej
f82e306928 Add a clearing-house pseudo-device for system monitoring devices
such as the LM78 and VT82C686A (and eventually ACPI).  Multiple
sensor devices can be hooked registered with `sysmon', and eventually
sysmon will also handle hardware (and software) watchdog timers.

Convert the `lm' and `viaenv' drivers to the new interface.
2000-06-24 00:37:19 +00:00