Subject: Re: FYI: ENVSYS 2 ready
To: Bill Stouder-Studenmund <wrstuden@netbsd.org>
From: Juan RP <juan@xtrarom.org>
List: tech-kern
Date: 06/21/2007 21:59:05
On Thu, 21 Jun 2007 11:57:39 -0700
Bill Stouder-Studenmund <wrstuden@netbsd.org> wrote:

> I think the concern is that sysmon_envsys_find can find something, but 
> since you don't do reference counting, as soon as you return it as found, 
> another thread can remove it from the list and presumably destroy it.
> 
> The mutex does a great job of protecting the list, but nothing protects 
> the entries after you take a reference.

Thanks for the great information. It's fixed now... sysmon_envsys_release()
was there for a reason :-)

I added another mutex and a condition variable to protect those operations
(sysmon_envsys_find() and sysmon_envsys_unregister()).

Latest patches at:

http://www.netbsd.org/~xtraeme/envsys2_api4.diff
http://www.netbsd.org/~xtraeme/envsys2_drivers.diff
http://www.netbsd.org/~xtraeme/envsys2_userland2.diff

-- 
Juan Romero Pardines	- The NetBSD Project
http://plog.xtrarom.org	- NetBSD/pkgsrc news in Spanish