Annotation of coherent/f/usr/include/sys/seg.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: /*
        !             7:  * /usr/include/sys/seg.h
        !             8:  *
        !             9:  * Segments.
        !            10:  *
        !            11:  * Revised: Mon May 24 15:50:18 1993 CDT
        !            12:  */
        !            13: 
        !            14: #ifndef         __SYS_SEG_H__
        !            15: #define         __SYS_SEG_H__
        !            16: 
        !            17: #include <common/feature.h>
        !            18: #include <common/__paddr.h>
        !            19: #include <sys/types.h>
        !            20: #include <sys/ksynch.h>
        !            21: 
        !            22: #if    ! __KERNEL__
        !            23: # error        You must be compiling the kernel to use this header
        !            24: #endif
        !            25: 
        !            26: /*
        !            27:  * NIGEL: for some reason the type "cseg_t" was in <sys/types.h>. It belongs
        !            28:  * here and in <sys/mmu.h> as much as it belongs anywhere.
        !            29:  */
        !            30: 
        !            31: #ifndef        __CSEG_T
        !            32: #define        __CSEG_T
        !            33: typedef        long            cseg_t;
        !            34: #endif
        !            35: 
        !            36: /*
        !            37:  * Segment structure.
        !            38:  */
        !            39: typedef struct seg {
        !            40:        struct   seg * s_forw;          /* Forward pointer */
        !            41:        struct   seg * s_back;          /* Backward pointer */
        !            42:        struct   inode * s_ip;          /* Inode pointer for shared text */
        !            43:        short    s_flags;               /* Flags */
        !            44:        short    s_urefc;               /* Reference count of segment */
        !            45:        short    s_lrefc;               /* Lock reference count */
        !            46: #if    _I386
        !            47:        off_t    s_size;                /* Size in bytes */
        !            48:        cseg_t   *s_vmem;               /* page table address */
        !            49: #else
        !            50:        faddr_t  s_faddr;               /* Memory access selector */
        !            51:        fsize_t  s_size;                /* Size in bytes */
        !            52:        __paddr_t  s_paddr;             /* Physical base address */
        !            53: #endif
        !            54:        daddr_t  s_daddr;               /* Disk base address */
        !            55: } SEG;
        !            56: 
        !            57: /*
        !            58:  * Flags (s_flags).
        !            59:  */
        !            60: #define SFCORE 0x0001                  /* Memory resident */
        !            61: #define        SFDOWN  0x0002                  /* Segment grows downward */
        !            62: #define SFSHRX 0x0004                  /* Shared segment */
        !            63: #define SFTEXT 0x0008                  /* Text segment */
        !            64: #define SFHIGH 0x0010                  /* Text segment */
        !            65: #define        SFSYST  0x0020                  /* System segment */
        !            66: 
        !            67: /*
        !            68:  * Pseudo flags.  (passed to salloc).
        !            69:  */
        !            70: #define        SFNSWP  0x4000                  /* Don't swap */
        !            71: #define SFNCLR 0x8000                  /* Don't clear segment */
        !            72: 
        !            73: /*
        !            74:  * Functions.
        !            75:  */
        !            76: extern SEG     *iomapvp();             /* bio.c */
        !            77: extern SEG     *segdupl();             /* seg.c */
        !            78: extern SEG     *ssalloc();             /* seg.c */
        !            79: extern SEG     *salloc();              /* seg.c */
        !            80: extern SEG     *segsext();             /* seg.c */
        !            81: extern SEG     *segdupd();             /* seg.c */
        !            82: extern SEG     *sdalloc();             /* seg.c */
        !            83: extern SEG     *smalloc();             /* seg.c */
        !            84: extern SEG     *shalloc();             /* seg.c */
        !            85: extern SEG     *exaread();             /* exec.c */
        !            86: extern SEG     *exsread();             /* exec.c */
        !            87: extern SEG     *exstack();             /* exec.c */
        !            88: 
        !            89: /*
        !            90:  * Global variables.
        !            91:  */
        !            92: extern int     sexflag;                /* Swapper existant */
        !            93: extern GATE    seglink;                /* Gate for s_forw and s_back */
        !            94: extern SEG     segswap;                /* Segments reserved for the swapper */
        !            95: extern SEG     segmq;                  /* Memory segment queue */
        !            96: extern SEG     segdq;                  /* Segment disk queue */
        !            97: extern SEG     segiom;                 /* I/O memory segment */
        !            98: 
        !            99: /*
        !           100:  * Open segment structure.
        !           101:  */
        !           102: typedef struct sr {
        !           103:        int      sr_flag;               /* Flags for this reference */
        !           104:        caddr_t  sr_base;               /* Virtual address base */
        !           105: #if    _I386
        !           106:        off_t    sr_size;               /* Mapped in window size */
        !           107: #else
        !           108:        vaddr_t  sr_size;               /* Mapped in window size */
        !           109: #endif
        !           110:        struct   seg *sr_segp;          /* Segment pointer */
        !           111: } SR;
        !           112: 
        !           113: /*
        !           114:  * Flags (sr_flag).
        !           115:  */
        !           116: #define SRFPMAP        0x01                    /* Segment is mapped in process */
        !           117: #define SRFDUMP        0x02                    /* Dump segment */
        !           118: #define        SRFDATA 0x04                    /* Data segment */
        !           119: #define        SRFRODT 0x08                    /* Data, read-only (used by shm) */
        !           120: #define        SRFBERM 0x10                    /* Segment to be removed (used by shm) */
        !           121: 
        !           122: #endif /* ! defined (__SYS_SEG_H__) */

unix.superglobalmegacorp.com

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