tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Support for "pshared" POSIX semaphores
Jason Thorpe <thorpej%me.com@localhost> wrote:
> Patch is here:
> https://patch-diff.githubusercontent.com/raw/thorpej/netbsd-src/pull/5.diff
Thanks for working on this.
- Why not just add a new syscall, instead of the KSEM_PSHARED stuff?
- If you add the 'fd' parameter to ksem_release(), then you can move
fd_putfile() there too (with fd != -1 case) and simplify a little bit.
- ksem_alloc_pshared_id: can ~KSEM_MARKER_MASK range be exhausted as an
attach vector?
- Can you eliminate ksem_insert_pshared_locked(), ksem_remove_pshared_locked()
and ksem_remove_pshared() wrappers? They serve no purpose.
- ksem_lookup_pshared_locked: it makes sense to use a hash table here.
Using hashinit() is clumsy nowadays.. personally, I would replace most
of the subr_hash.c use cases with something like rhashmap [1] and much
more convenient get/put/del semantics. Anyway, that is off-topic, so
up to you if you want to bother.
[1] https://github.com/rmind/rhashmap
--
Mindaugas
Home |
Main Index |
Thread Index |
Old Index