README

You can build this package with the command "make".

	Below are the first parts of the files hecomsub.doc, semsub.doc
and shmsub.doc.

-----
hecomsub.doc
	Kazuro Furukawa (furukawa@kek.jp)
	Jul.8.1993., Sep.15,25.1993.

@(#)hecomsub.doc v1.0.4 K.Furukawa, Jul.1993-Sep.1993

File hecomsub.c containes he_xxx functions for message communication
routines.  They use fs_xxx semaphore routines in semsub.c and cm_xxx 
shared-memory routines in shmsub.c, which are described in semsub.doc
and shmsub.doc respectively.
These routines are based on swevent programs. This package is available 
at ~furukawa/work/shmsem/shmsem.tar.Z or 
olive.kek.jp:~ftp/pub/unix/shmsem.tar.Z.
The library name is libhe.a (libhe.l for OS9), which includes hecomsub,
semsub and shmsub routines.

This package acts like UDP communication system, but is reliable. 
It forms multi clients, single server communication system. 
However, you must follow the sequence, send-accept-reply-receive. 

The file hecomsub.c defines he_open, he_send, he_accept, he_reply, 
he_receive and he_close routines.

These routines run on Sony/News, Sun, VAX/Ultrix, DecStation/Ultrix, 
Hpux, NEC/SXA, Apple/AUX, LynxOS, and OS9/68K.
They don't run on NeXT, Mitsubishi/Umx, MSDOS and MacOS/MacTCP.

BASIC USAGE:
 The basic usage below describes resource locking between two processes.
  process A (client):
   he_open( 123, 1024, 1 );			/* open communication
   he_send( buffer, size, 1 );			/* send request message
   ...
   size = he_receive( buffer, size, 1 );	/* receive reply message
   ...
   he_close( 1 );				/* close channel
  process B (server):
   he_open( 123, 1024, 1 );			/* open communication
   size = he_accept( buffer, size, 1 );		/* accept request
   ...
   he_reply( buffer, size, 1 );			/* send reply message
   ...
   he_close( 1 );				/* close channel

-----
shmsub.doc
	Kazuro Furukawa (furukawa@kek.jp)
	Jul.8., Aug.28., Sep.25.1993.

@(#)shmsub.doc v1.2.2 K.Furukawa, Jul.1993-Aug.1993

File shmsub.c containes cm_xxx functions for shared memory handling.
These routines are based on shmtest and swmodule programs (see 
~furukawa/work/shmtest).  These routines are available in 
the hecomsub package, shmsem.tar.Z.

It supports shared memory handling on unix and OS9 systems.  
On OS9 shared memory is called as data modules.  

The file shmsub.c defines cm_check, cm_create, cm_map, cm_unmap, 
cm_remove and cm_info routines.

These routines run on Sony/News, Sun, VAX/Ultrix, DecStation/Ultrix, 
Hpux, NEC/SXA, Apple/AUX, LynxOS, and OS9/68K.
They don't run on NeXT, Mitsubishi/Umx, MSDOS and MacOS/MacTCP.

BASIC USAGE:
 The basic usage below describes data exchange between two processes.
  process A:
   cm_create( 123, 1024, CM_PALL, CM_OERR );	/* create common memory
   mem = (int *)cm_map( 123, CM_OERR );	/* map memory
   *mem = data;				/* write data
   *(mem+1) = data2;
   ...
   cm_unmap( cm_desc, CM_OERR );		/* unmap memory
  process B:
   mem = (int *)cm_map( 123, CM_OERR );	/* map memory
   data = *mem;				/* read data
   data2 = *(mem+1);
   ...
   cm_unmap( cm_desc, CM_OERR );		/* unmap memory
   cm_remove( 123, CM_OERR );			/* remove common memory

-----
semsub.doc
	Kazuro Furukawa (furukawa@kek.jp)
	Aug.14., Sep.14,25.1993.

@(#)semsub.doc v1.0.3 K.Furukawa, Aug.1993-Sep.1993

File semsub.c containes fs_xxx functions for binary semaphore handling.
These routines are based on swevent programs. These routines are 
available in the hecomsub package, shmsem.tar.Z.

It supports binary semaphore handling on Unix and OS9 systems.  
On OS9 semaphore is called as event.  

The file semsub.c defines fs_check, fs_create, fs_attach, fs_detach, 
fs_release, fs_wait, fs_remove and fs_info routines.

These routines run on Sony/News, Sun, VAX/Ultrix, DecStation/Ultrix, 
Hpux, NEC/SXA, Apple/AUX, LynxOS, and OS9/68K.
They don't run on NeXT, Mitsubishi/Umx, MSDOS and MacOS/MacTCP.

BASIC USAGE:
 The basic usage below describes resource locking between two processes.
  process A:
   fs_create( 123, FS_PALL, FS_OERR );		/* create semaphore
   id = fs_attach( 123, FS_OERR );		/* attach semaphore
   ...
   fs_release( id, FS_OERR );			/* release resource
   ...
   fs_detach( 123, FS_OERR );			/* detach semaphore
  process B:
   id = fs_attach( 123, FS_OERR );		/* attach semaphore
   fs_wait( id, FS_OERR );			/* wait resource
   ...
   fs_remove( 123, FS_OERR );			/* remove common memory

