Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 1996 10:22:24 +0900 (JST)
From:      Michael Hancock <michaelh@cet.co.jp>
To:        "Ron G. Minnich" <rminnich@Sarnoff.COM>
Cc:        hackers@freebsd.org
Subject:   Re: filemalloc etc. for shared memory between processes
Message-ID:  <Pine.SV4.3.93.960709101710.18765C-100000@parkplace.cet.co.jp>
In-Reply-To: <Pine.SUN.3.91.960708091005.18917F-100000@terra>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Jul 1996, Ron G. Minnich wrote:

> > 	I wonder how one should properly implement locking of memory
> > 	regions in this case. Will appropriate fcntl(2) be
> > 	enough?
> 
> no, you use the fastlock() i posted earlier. fcntl is probably the worst 
> way there is to lock shared regions. You want memory-value-based locking 
> so you can use compare-and-swap (or equivalent).

I read in the New Frontiers book about 4.4bsd semaphores; something like
mset and mclear, but I didn't see any mention of this in the 4.4 deamon
book.

Does the pthreads lib have facilities for locking data structures in
shared memory?

-mike




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.93.960709101710.18765C-100000>