From owner-cvs-all Mon Jan 13 23: 6:35 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D84C537B401; Mon, 13 Jan 2003 23:06:33 -0800 (PST) Received: from smtp04.iprimus.com.au (smtp04.iprimus.com.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FD8C43E4A; Mon, 13 Jan 2003 23:06:32 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from smtp02.iprimus.net.au (210.50.76.70) by smtp04.iprimus.com.au (6.7.010) id 3DF583C30035102E; Tue, 14 Jan 2003 18:06:23 +1100 Received: from dilbert.robbins.dropbear.id.au ([210.50.82.130]) by smtp02.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.5600); Tue, 14 Jan 2003 18:06:20 +1100 Received: from dilbert.robbins.dropbear.id.au (1arwnmfcfeocz0pj@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h0E76Hlk092340; Tue, 14 Jan 2003 18:06:18 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h0E76GdX092339; Tue, 14 Jan 2003 18:06:16 +1100 (EST) (envelope-from tim) Date: Tue, 14 Jan 2003 18:06:15 +1100 From: Tim Robbins To: Alfred Perlstein Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc_r/man sem_init.3 Message-ID: <20030114180615.A91716@dilbert.robbins.dropbear.id.au> References: <200301140412.h0E4CXTa093756@repoman.freebsd.org> <20030114053331.GK33821@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030114053331.GK33821@elvis.mu.org>; from bright@mu.org on Mon, Jan 13, 2003 at 09:33:31PM -0800 X-OriginalArrivalTime: 14 Jan 2003 07:06:21.0682 (UTC) FILETIME=[7168E520:01C2BB9B] Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Jan 13, 2003 at 09:33:31PM -0800, Alfred Perlstein wrote: > * Tim J. Robbins [030113 20:12] wrote: > > tjr 2003/01/13 20:12:33 PST > > > > Modified files: > > lib/libc_r/man sem_init.3 > > Log: > > Sharing semaphores between processes works now, so remove the stale comments > > about it always returning EPERM. Document that ENFILE occurs when the > > limit on kernel semaphores is reached. > > Uh, they can't work. The code should be patched to return EPERM > for shared as: > > 1) we can't share pthread_mutexes/condvars between processes yet. > 2) we allocate the space this puts the actual data into private > heap memory so that even if you give the pointer to another process > it is meaningless unless they are sharing the same vmspace. > > I appreciate the other work you've done here, however in the future > please contact me so that this sort of useless work can be avoided. > I could have easily explained the problem had you contacted me first. Ok, I guess I didn't test it enough. I had separate procs sharing the same address space, and didn't have time to try doing it with SHM. I don't think we actually need to be able to share mutexes/condvars between processes, though, since the only time semaphores initialised with pshared != 0 are locked is in sem_destroy(). Anyway, I'll back out the last change to sem_init.3 until sem_t becomes a plain old struct. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message