From owner-svn-src-all@FreeBSD.ORG Thu Dec 10 00:24:29 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15FD9106566C; Thu, 10 Dec 2009 00:24:29 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E12CD8FC12; Thu, 10 Dec 2009 00:24:28 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 7269F46B06; Wed, 9 Dec 2009 19:24:28 -0500 (EST) Date: Thu, 10 Dec 2009 00:24:28 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Andrew Gallatin In-Reply-To: <4B1FAC12.6080907@cs.duke.edu> Message-ID: References: <200912082048.nB8Km6aP099420@svn.freebsd.org> <200912081645.37356.jhb@freebsd.org> <20091208221028.GA57735@stack.nl> <200912081742.58162.jhb@freebsd.org> <4B1FAC12.6080907@cs.duke.edu> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Jilles Tjoelker , John Baldwin Subject: Re: svn commit: r200274 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2009 00:24:29 -0000 On Wed, 9 Dec 2009, Andrew Gallatin wrote: > John Baldwin wrote: > >> The fact that we don't fail attempts to use pshared outright is probably >> dubious. They cannot possibly work as currently implemented aside from >> fork() since the structure embeds a file descriptor and file descriptor >> indices are a per-process namespace, not a global namespace. > > FWIW, this is what confused me. It tends to be kind of a land-mine, since > programs can be ported from Linux, and appear to work at first for casual > use. If we don't support pshared, we should return an error from sem_init() > to make it obvious. > > Also, perhaps the sem_init() man page should mention sem_open(), since that > seems to be the only way to really share a semaphore between processes on > FreeBSD. It's beginning to sound like our POSIX semaphores should be behaving more like umtx, which requires only a shared page, and less like file descriptors. Of course, that would make the global namespace more tricky... Robert N M Watson Computer Laboratory University of Cambridge