Unnamed POSIX shared semaphores

Daniel Eischen deischen at freebsd.org
Mon Jun 1 21:44:29 UTC 2009


On Mon, 1 Jun 2009, Bruce Simpson wrote:

> Jilles Tjoelker wrote:
>> If process-shared semaphores really work, then the above structure is
>> not a pathological case. Effectively, sem_t is carved in stone. So
>> process-private semaphores should continue to have most of their stuff
>> in a separately allocated structure, to preserve flexibility.
>> 
>
> There was an inadvertent race in FreeBSD's POSIX semaphores which I fixed in 
> HEAD and STABLE about 6 weeks before 7.2 was released.
>
> I believe process-shared POSIX semaphores now work -- the Python 
> 'multiprocessing' regression test now runs to completion with no errors on 
> both HEAD and STABLE.

Process-shared semaphores, mutexes, etc, will never work
until their public types are structs, not pointers to
structs (i.e. allocated by our library functions).

The intrinsic *kernel* semaphore functions (ksem) supposedly
do support process-shared semantics, but our POSIX functions'
use of them cannot be shared across processes.

-- 
DE


More information about the freebsd-stable mailing list