Subject: Re: envsys version 2 API
To: Juan RP <juan@xtrarom.org>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 04/24/2007 15:27:56
On Apr 24, 2007, at 3:25 PM, Juan RP wrote:

> On Tue, 24 Apr 2007 15:22:56 -0700
> Jason Thorpe <thorpej@shagadelic.org> wrote:
>
>> Probably better is "deliver an kevent every time the data has
>> changed".  Of course the data can be read any time, but the driver
>> polls, gets new values, compares to the last values, and sends a
>> kevent when any of the values differ.
>
> Right now my code checks if the new data is different than current
> data in the dictionary, and if it's not doesn't update it.

That means you pretty much have all of the infrastructure in place to  
be able to add a kevent notification as an enhancement :-)

> But perhaps using kqueue is faster, I don't know.

The only added benefit is reducing the frequency of polling by the  
application consuming the envsys data.  Event-driven is almost always  
better :-)

-- thorpej