[Simh] Unable to build on NetBSD

Rhialto rhialto at falu.nl
Tue Apr 28 12:42:03 EDT 2015


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=HEAD .

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20150428/39ee2a15/attachment.sig>


More information about the Simh mailing list