Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Apr 2017 11:40:18 -0400
From:      Drake Talley <axylos@doge.city>
To:        freebsd-arch@freebsd.org
Subject:   sysctl for named posix semaphores
Message-ID:  <20170429154018.GA3703@kunai.nyc.rr.com>

next in thread | raw e-mail | index | archive | help
I'm interested in being able to display information about all active named POSIX
semaphores.  I have not been able to find a sane way to do this, and
unless there's something obvious I've missed, it may be worth
considering building a sysctl or some other interface for accessing this
information.  A while back in the mailing list there seems to have been
some discussion about building out a "semfs" or some other file system
interface akin to /dev/shm in Linux, but there were concerns about the
POSIX compatibility of that approach.  

On a related note in /src/sys/kern/uipc_shm.c there is the following
TODO:

 * (1) Need to export data to a userland tool via a sysctl.  Should ipcs(1)
 *     and ipcrm(1) be expanded or should new tools to manage both POSIX
 *     kernel semaphores and POSIX shared memory be written?


So, it's been acknowledged that a sysctl or some new utility is on the
table, and exporting this data to userland isn't blasphemous, although
perhaps not the most pressing need at the moment.  Setting Sys V IPC on
the side, has there been discussion or consideration of similar tools
for POSIX semaphores?



Whether or not it's deemed worth doing, I'd appreciate any info or
references to discussions about this topic since I'm like
to tinker with it on my own if nothing else.


Drake



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170429154018.GA3703>