[comp.os.mach] netmsgserver under osf/1 - a possible solution

limey@hri.com (Craig Hughes) (06/20/91)

Well, after much wailing and knashing of teeth, I think I have the
netmsgserver, as delivered by osf, in a working state. Here's what you
need to fix to get it to run:

mach_init:		as previously stated, build mach_init and place
			it in /sbin along with the init program. It will
			automagically be called at boot time, and will
			exec off a copy of init.

in datagram.c:		line 133 pthread_create() call:
			There is an extraneous ";" that causes the error
			message to always be printed. Remove it!

in nmserver.c:		before the last curly brace of main, place a
			pthread_exit(). This will make sure that the
			threads previously created will still be hanging
			around. If you place this call here, the entire
			task along with all of it's threads die.

Recompile, and you should get:

  No default configuration file
  Started netmsgserver at Wed Jun 19 14:56:19 1991
  netmsgserver:   print_level = 5.
  Broadcast address: 0xffffcb89
  (5041668) Debug code 1121 : 7
  Network Server initialised.


or something very close to this. I believe it's in a useful state at
this point - I've only done some preliminary testing as of this date.
Any comments from more experienced people would be appreciated.

And now....I have a question:

I'm trying to implement a shared memory daemon that will allocate a
memory object and register it with the netmsgserver. Client processes
will then do a netname_look_up() to acquire the port, and then call
vm_map() to place it in their address space. Is this a reasonable
approach? If so, how do I go about getting the memory object? The
implementation of sysV shared memory (shmget shmat etc.) in osf/1  uses a
call to vnode_pager_get() to acquire a memory object and set up the backing
store. Is there a user-level callable function that will also do this?

As always, thanks for the information!

-- 
--------------------------------------------------------------------------------
Craig S. Hughes				UUCP: ...bbn!hri.com!limey
Horizon Research, Inc.			INET: limey@hri.com
1432 Main Street
Waltham, MA 02154			
			<- ------------- ->
--------------------------------------------------------------------------------