From owner-freebsd-stable@FreeBSD.ORG Mon Jun 1 21:44:29 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 270A0106566C; Mon, 1 Jun 2009 21:44:29 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id D38028FC0A; Mon, 1 Jun 2009 21:44:28 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n51LUSsC009712; Mon, 1 Jun 2009 17:30:28 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Mon, 01 Jun 2009 17:30:28 -0400 (EDT) Date: Mon, 1 Jun 2009 17:30:28 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Bruce Simpson In-Reply-To: <4A24457C.6060100@FreeBSD.org> Message-ID: References: <20090601161903.GA40377@stack.nl> <4A24457C.6060100@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Vlad Galu , freebsd-stable@freebsd.org, Jilles Tjoelker Subject: Re: Unnamed POSIX shared semaphores X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 21:44:29 -0000 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