summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sensors.c
AgeCommit message (Collapse)Author
2007-07-03fix a memory leak that was introduced in r1.20 on 2007-06-24T05Z; ok dlgConstantine A. Murenin
2007-06-24rework sensor tasks to use the kernels generic workq rather than a specialDavid Gwynne
kernel thread of its own. the api has changed (which will be fixed in the manpage shortly) so all the users of sensor tasks that i can find have been fixed too. noone tested, so its going in to force people to run with it. "put it in" deraadt@
2007-06-04perhaps it made art's head hurt because it is wrong. triggers NULLTheo de Raadt
deref in sensor_task_work(); found by krw, dlg should talk to him
2007-06-01rework the sensor task handling to run in the kernels generic workq.David Gwynne
apologies to art for abusing timeouts so badly. apologies to tedu for making his head hurt. tested by and ok tedu@
2007-03-22split userland & kernel struct sensor/sensordev so that the additionTheo de Raadt
of new fields in the future is less disruptive. This is done similar to how struct proc is handled for ps(1). ok jmc (man page changes) tested fkr simon, and more suggestions from millert
2006-12-23kernel code implimemting the new two-level sensor api; written byTheo de Raadt
Constantine A. Murenin
2006-11-06force a new sensor task to be run as soon as possible. previously it usedDavid Gwynne
to have to wait its timeout before the first run, which led to some weird values or states being visible after boot, but before the first update. for jolan@
2006-05-28Remove device id from hotplug events.Michael Knudsen
ok henning
2006-05-28intrducing device type DV_SENSOR turned out to be a bad idea as itHenning Brauer
affects way more than just hotplug messages. remove DV_SENSOR and use DV_DULL for the moment. proper solution coming. discussed with deraadt mk jason
2006-05-28need <sys/device.h> or it doesn't compile on sparc64Jason Wright
2006-05-28Include device id in hotplug events. This will be used by ntpd to checkMichael Knudsen
sensors on attach/detach. hotplugd changes following in a minute. ok henning.
2006-05-28unbreak, of course this needs to included sys/hotplug.h tooHenning Brauer
2006-05-27Make sensor add/remove create hotplug events (after much prodding from ↵Michael Knudsen
henning). Idea from mbalmer. 'in it goes!' deraadt.
2006-03-12sensors_head is only used in kern_sensors.c, so its unnecessay to declareDavid Gwynne
it in sensors.h. from Constantine A. Murenin
2006-01-28get rid of the sensors globals. theyre were only used by sysctl forDavid Gwynne
locating and finding the correct sensor to spit out. instead provide a a sensor_get function that wraps up the access to the vars. theyre now safe inside kern_sensors.c. theres also a touch of whitespace tweaking ok grange@
2006-01-19Replace SENSOR_ADD() macro with a pair of functionsAlexander Yurchenko
sensor_add()/sensor_del() so that sensors can be attached and detached dynamicaly. ok kettenis@ deraadt@ dlg@
2005-11-21rename the sensor globals to names that are not obvious to avoidDavid Gwynne
collisions with local variable names someone might make. this has bitten me twice now and caused me to lose about 4 hours scratching my head when nsensors just magically corrupts and gets bigger. at least my ram isnt screwed. ok marco@
2005-11-13shorten this a bit through better use of TAILQ macros.David Gwynne
mostly ok otto@ (ive since fixed the chunk he was worried about)
2005-11-10the tasklist can be modified while the kthread is sleeping, so refetchDavid Gwynne
the first element before iterating through the rest of them. stylistic guidance from angela pascoe. mark all tasks using the same argument as not running anymore, rather than just the first one we bump into.
2005-11-10first go at a generic kthread for sensors to be run out of. its a bitDavid Gwynne
hairy at the moment, but its going into the tree so it can be worked on and used.
2005-11-10split the sensors stuff out into a source file of its own.David Gwynne
tested on GENERIC and RAMDISK_CD to see if the small_kernel stuff stays happy