[Simh] Unable to build on NetBSD

Mark Pizzolato - Info Comm Mark at infocomm.com
Tue Apr 28 19:44:53 EDT 2015


On Tuesday, April 28, 2015 at 9:42 AM, Rhialto wrote:
> On Tue 28 Apr 2015 at 09:20:11 -0400, Clem Cole wrote:
> > Hmm, the PWD 3.0/System V later Posix shm(2) functions I would have
> > expected NetBSD to have picked up by now I agree.
> 
> Do you mean shmat(2), shmdt(2), shmget(2), etc? NetBSD has those.
> Just not yet the newer shm_open(3). It's a different kind of shared memory
> anyway: it persists after all processes that use it have terminated. The
> descriptors are not file descriptors.
> 
> > But no matter, I believe you can use the mmap(2) mechanism if you want
> > shared memory in BSD post 4.4.
> 
> A potential worry with mmap(2) might be about how immediately a change
> in mapped memory is visible in the other processes, if you use mmap on a
> random file. The existence of the msync(2) system call makes this
> worrisome, altough the manual pages don't seem to address this one way or
> another.
> 
> NetBSD's new-in-version-7 shm_open(3) function actually uses a normal file,
> but on a ram disk file system. I'm not sure if this is for performance reasons,
> or to guarantee immediate visibility between processes.
> 
> See
> http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/librt/shm.c?only_with_tag=HE
> AD .

Are you suggesting that the memory reference semantics (and coherency concerns) when using a mmap'ed shared memory area (between two or more processes) is NOT equivalent to multiple threads in the same process referencing the same data in their single address space?

Aside from my above question, thanks for the fix for the X11R7 issue with the makefile.

Meanwhile, Cory's original simh building problem has been fixed in the github master branch.

- Mark



More information about the Simh mailing list