Date: Thu, 19 Sep 2002 00:09:26 -0400 (EDT) From: Garrett Wollman <wollman@lcs.mit.edu> To: Daniel Eischen <eischen@pcnet1.pcnet.com> Cc: hackers@FreeBSD.org Subject: Re: sem_init help? Message-ID: <200209190409.g8J49QcN045797@khavrinen.lcs.mit.edu> In-Reply-To: <Pine.GSO.4.10.10209182206210.3071-100000@pcnet1.pcnet.com> References: <20020919015911.GQ86737@elvis.mu.org> <Pine.GSO.4.10.10209182206210.3071-100000@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Wed, 18 Sep 2002 22:16:07 -0400 (EDT), Daniel Eischen <eischen@pcnet1.pcnet.com> said: > The semaphore remains active until it is destroyed. If you don't > want to track its page, can you hook it into ipcrm(1)? A simple way of implementing process-shared anonymous semaphores, using the kernel support, is to simply create a temporary semaphore, and (important part) store the pathname in the sem_t. Then, every semaphore operation becomes sem_open, kernel operation, sem_close, and destroy unlinks the temporary semaphore. This would be a poor-quality implementation, but it would work. A better implementation would not use a temporary semaphore at all. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209190409.g8J49QcN045797>