tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Equivalent of FreeBSD kernel semaphore?



manu%netbsd.org@localhost (Emmanuel Dreyfus) wrote:
> Christos Zoulas <christos%astron.com@localhost> wrote:
> 
> > Why don't you implement them the same way like FreeBSD did, using a
> > mutex and a condition variable? 
> 
> I am not sure I correctly understand what you mean: is it that we do not
> have an equivalent of NetBSD's struct sema, and that it would need to be
> implemented using mutex and condvar?
> 

When new synchronisation primitives were designed, it was a deliberate
decision to not add kernel semaphore.  We have modern equivalents, which
achieve the same (well, more) and are more robust.

If you need a wrapper for compatibility, please keep it in your code.

-- 
Mindaugas


Home | Main Index | Thread Index | Old Index