Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2003 18:06:15 +1100
From:      Tim Robbins <tjr@FreeBSD.org>
To:        Alfred Perlstein <bright@mu.org>
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>
In-Reply-To: <20030114053331.GK33821@elvis.mu.org>; from bright@mu.org on Mon, Jan 13, 2003 at 09:33:31PM -0800
References:  <200301140412.h0E4CXTa093756@repoman.freebsd.org> <20030114053331.GK33821@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 13, 2003 at 09:33:31PM -0800, Alfred Perlstein wrote:

> * Tim J. Robbins <tjr@FreeBSD.org> [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




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