home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / sharedmem / part01 / src / cm_msg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-17  |  938 b   |  32 lines

  1. /*
  2.  
  3. This file contains definitions relating to message passing between
  4. the CM manager and user.
  5.  
  6. Following is the structure of a message.  Unfortunately, this is illegal
  7. because "number" is variable as well as the sizeof(slot).  This structure
  8. will be built dynamically when necessary and discarded after the message
  9. has been used (read or written).  In order to make it legal, we will leave
  10. comment out the "slot" field and read/write that by hand.  This hack will
  11. be used throughout the message code.  Yuck.
  12.  
  13. */
  14.  
  15. struct msg {
  16.     int version;        /* version of cmm system */
  17.     int size;        /* size of msg structure itself */
  18.     int slots;            /* number of slots */
  19.     char name[CM_PROCESSNAMELENGTH];
  20.     char read_wait;        /* TRUE, if sender waiting for an acknowledgement */
  21.     struct slot data[1];    /* really want [0] */
  22. } ;
  23.  
  24. /*
  25.  
  26. Each message is composed of a header.  The header includes the process name,
  27. number of slots, and the slots themselves.
  28.  
  29. */
  30.  
  31.  
  32.