m...@netbsd.org (Emmanuel Dreyfus) wrote: > Christos Zoulas <chris...@astron.com> 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