argument, just pass sme->sme_name to it.
- sysmon_envsys_register: drop the array in all cases, not just when
there's an error. The reference is stored in the dictionary anyway...
- Update some comments.
- Add the SLIST for sensor descriptions and sme_uniqsensors into the
struct sysmon_envsys (it's per device now).
- Use only one common struct with three members for the static tables
(there's no need to have different structs just for them).
- While initializing/destroying the events framework, use the
strategy specified by Andrew Doran in:
http://mail-index.netbsd.org/tech-kern/2007/06/21/0025.html).
(forgot in previous)
- Add the SLIST for sensor descriptions and sme_uniqsensors into the
struct sysmon_envsys (it's per device now).
- Use only one common struct with three members for the static tables
(there's no need to have different structs just for them).
- While initializing/destroying the events framework, use the
strategy specified by Andrew Doran in:
http://mail-index.netbsd.org/tech-kern/2007/06/21/0025.html).
- Remove sme_mtx, a global lock (sme_list_mtx) is used to access to
the sysmon envsys device.
- Allocate memory with KM_NOSLEEP rather than KM_SLEEP if there's a
mutex held, to avoid sleeping.
- Remove sysmon_envsys_createplist() and add the logic into
sysmon_envsys_register().
- sysmon_envsys_register: allocate the array and dictionaries required
in advance for a device before the locking and adding the objects
into the array happens.
- Rename sme_make_dictionary() to sme_add_sensor_dictionary() and pass
to it the dictionary on which the objects will be stored for a sensor.
- Improve locking here and there.
Thanks to Mindaugas Rasiukevicius and Andrew Doran for comments.
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).