Annotation of coherent/d/PS2_KERNEL/include/sys/shm.h, revision 1.1

1.1     ! root        1: /* (-lgl
        !             2:  *     COHERENT Version 4.0
        !             3:  *     Copyright (c) 1982, 1992 by Mark Williams Company.
        !             4:  *     All rights reserved. May not be copied without permission.
        !             5:  -lgl) */
        !             6: #ifndef SHM_H
        !             7: #define        SHM_H
        !             8: /*
        !             9: **     IPC Shared Memory Facility.
        !            10: */
        !            11: 
        !            12: #include <sys/ipc.h>
        !            13: #include <sys/types.h>
        !            14: 
        !            15: 
        !            16: extern int shmfd;              /* file descriptor to access shared memory */
        !            17: 
        !            18: 
        !            19: /*
        !            20: **     Permission Definitions.
        !            21: */
        !            22: #define        SHM_R   0400            /* read permission */
        !            23: #define        SHM_W   0200            /* write permission */
        !            24: 
        !            25: /*
        !            26: **     ipc_perm Mode Definitions.
        !            27: */
        !            28: #define        SHM_CLEAR       01000   /* clear segment on next attach */
        !            29: #define        SHM_DEST        02000   /* destroy segment when # attached = 0 */
        !            30: 
        !            31: /*
        !            32: **     Message Operations Flags.
        !            33: */
        !            34: #define        SHM_RDONLY      010000  /* attach read-only (else read-write) */
        !            35: 
        !            36: /*
        !            37: **     There is a shared mem id data structure for each segment in the system.
        !            38: */
        !            39: struct shmid_ds {
        !            40:        struct ipc_perm shm_perm;       /* operation permission struct */
        !            41:        int             shm_segsz;      /* segment size */
        !            42: #ifdef _I386
        !            43:        unsigned short  shm_cpid;       /* pid of creator */
        !            44:        unsigned short  shm_lpid;       /* pid of last shmop */
        !            45: #else
        !            46:        unsigned short  shm_lpid;       /* pid of last shmop */
        !            47:        unsigned short  shm_cpid;       /* pid of creator */
        !            48: #endif
        !            49:        unsigned short  shm_nattch;     /* current # attached */
        !            50: #ifndef _I386
        !            51:        unsigned short  shm_cnattch;    /* in memory # attached */
        !            52: #endif
        !            53:        time_t          shm_atime;      /* last shmat time */
        !            54:        time_t          shm_dtime;      /* last shmdt time */
        !            55:        time_t          shm_ctime;      /* last change time */
        !            56: };
        !            57: 
        !            58: /*
        !            59: **     Ioctl Commands issued to Shared Memory Device Driver (on Coherent).
        !            60: */
        !            61: #define        SHMIOC  ('H'<<8)
        !            62: #define        SHMCTL  (SHMIOC+'C')
        !            63: #define        SHMGET  (SHMIOC+'G')
        !            64: #define        SHMAT   (SHMIOC+'A')
        !            65: #define        SHMDT   (SHMIOC+'D')
        !            66: 
        !            67: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.