home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 202.img / SCO386N2.TD0 / usr / include / sys / shm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-18  |  1.4 KB  |  52 lines

  1. /*
  2.  *    @(#) shm.h 2.2 88/05/18 
  3.  *
  4.  *    Copyright (C) The Santa Cruz Operation, 1984, 1985, 1986, 1987, 1988.
  5.  *    Copyright (C) Microsoft Corporation, 1984, 1985, 1986, 1987, 1988.
  6.  *    This Module contains Proprietary Information of
  7.  *    The Santa Cruz Operation, Microsoft Corporation
  8.  *    and AT&T, and should be treated as Confidential.
  9.  */
  10.  
  11. /*
  12.  * THIS FILE CONTAINS CODE WHICH IS DESIGNED TO BE
  13.  * PORTABLE BETWEEN DIFFERENT MACHINE ARCHITECTURES
  14.  * AND CONFIGURATIONS. IT SHOULD NOT REQUIRE ANY
  15.  * MODIFICATIONS WHEN ADAPTING XENIX TO NEW HARDWARE.
  16.  */
  17.  
  18.  
  19. /* System V defines */
  20. #define SHM_RDONLY    010000     /* attach read-only, else read-write */
  21. #define SHM_RND        020000
  22.  
  23. /* shm segs start at addr given by (addr - (addr % SHMLBA)) */
  24. #ifdef M_I386
  25. #define SHMLBA        0x400000
  26. #else
  27. #define SHMLBA        0x10000
  28. #endif
  29.  
  30. /* shmctl cmds:  NOT YET IMPLEMENTED -- EINVAL IF USED */
  31. #define SHM_LOCK    3
  32. #define SHM_UNLOCK    4
  33.  
  34. struct    shmid_ds {
  35.     struct    ipc_perm shm_perm;    /* operation permission struct */
  36.     int    shm_segsz;        /* segment size */
  37.     ushort    shm_ptbl;        /* addr of sd segment */
  38.     ushort    shm_lpid;        /* pid of last shared mem op */
  39.     ushort    shm_cpid;        /* creator pid */
  40.     ushort    shm_nattch;        /* current # attached */
  41.     ushort    shm_cnattch;        /* in-core # attached */
  42.     time_t    shm_atime;        /* last attach time */
  43.     time_t    shm_dtime;        /* last detach time */
  44.     time_t    shm_ctime;        /* last change time */
  45. };        
  46.  
  47. #ifdef M_I386
  48. extern    char    *shmat();
  49. #else
  50. extern    char far *shmat();
  51. #endif
  52.