Annotation of coherent/a/usr/include.b4ps2/sys/uproc.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:  * The user process area.
        !             8:  */
        !             9: 
        !            10: #ifndef         UPROC_H
        !            11: #define         UPROC_H        UPROC_H
        !            12: 
        !            13: #include <sys/param.h>
        !            14: #include <sys/types.h>
        !            15: #include <dirent.h>
        !            16: #include <sys/io.h>
        !            17: #include <sys/proc.h>
        !            18: #include <signal.h>
        !            19: 
        !            20: #ifdef _I386
        !            21: #include <sys/reg.h>
        !            22: #include <ieeefp.h>
        !            23: #else
        !            24: #include <sys/machine.h>
        !            25: #endif
        !            26: /*
        !            27:  * Open segment structure.
        !            28:  */
        !            29: typedef struct sr {
        !            30:        int      sr_flag;               /* Flags for this reference */
        !            31:        vaddr_t  sr_base;               /* Virtual address base */
        !            32: #ifdef _I386
        !            33:        off_t    sr_size;               /* Mapped in window size */
        !            34: #else
        !            35:        vaddr_t  sr_size;               /* Mapped in window size */
        !            36: #endif
        !            37:        struct   seg *sr_segp;          /* Segment pointer */
        !            38: } SR;
        !            39: 
        !            40: /*
        !            41:  * Flags (sr_flag).
        !            42:  */
        !            43: #define SRFPMAP        01                      /* Segment is mapped in process */
        !            44: #define SRFDUMP        02                      /* Dump segment */
        !            45: #define        SRFDATA 04                      /* Data segment */
        !            46: 
        !            47: /*
        !            48:  * User process structure.
        !            49:  *
        !            50:  * Remember to update UPROC_VERSION whenever you change this struct.
        !            51:  *
        !            52:  * U_OFFSET is the byte offset of uproc within segment SIUSERP.
        !            53:  * See also the definition of "u" at start of as.s.
        !            54:  */
        !            55: #define U_OFFSET       0xC00
        !            56: #define U_COMM_LEN     10
        !            57: 
        !            58: typedef struct uproc {
        !            59: #ifdef _I386
        !            60:        /* Magic number UPROC_VERSION identifies this uproc struct.  */
        !            61: #define UPROC_VERSION 0x0104
        !            62:        unsigned short u_version;       /* Version number for uproc struct */
        !            63: #endif /* _I386 */
        !            64:        char     u_error;               /* Error number (must be first) */
        !            65:        char     u_flag;                /* Flags (for accounting) */
        !            66:        int      u_uid;                 /* User id */
        !            67:        int      u_gid;                 /* Group id */
        !            68:        int      u_ruid;                /* Real user id */
        !            69:        int      u_rgid;                /* Real group id */
        !            70:        int      u_euid;                /* Effective user id */
        !            71:        int      u_egid;                /* Effective group id */
        !            72:        unsigned u_umask;               /* Mask for file creation */
        !            73:        struct   inode *u_cdir;         /* Current working directory */
        !            74:        struct   inode *u_rdir;         /* Current root directory */
        !            75:        struct   fd *u_filep[NOFILE];   /* Open files */
        !            76:        struct   sr u_segl[NUSEG];      /* User segment descriptions */
        !            77: #ifdef _I386
        !            78:        int      (*u_sfunc[MAXSIG])();  /* Signal functions */
        !            79: #else
        !            80:        int      (*u_sfunc[NSIG])();    /* Signal functions */
        !            81: #endif
        !            82: 
        !            83:        /*
        !            84:         * System working area.
        !            85:         */
        !            86:        struct   seg *u_sege[NUSEG];    /* Exec segment descriptors */
        !            87:        MPROTO   u_sproto;              /* User prototype */
        !            88:        MCON     u_syscon;              /* System context save */
        !            89:        MENV     u_sigenv;              /* Signal return */
        !            90:        MGEN     u_sysgen;              /* General purpose area */
        !            91: #ifdef _I386
        !            92:        int      u_args[MSACOUNT];
        !            93: #else
        !            94:        int      u_args[(MSASIZE*sizeof(char)+sizeof(int)-1)/sizeof(int)];
        !            95: #endif
        !            96:        struct   io u_io;               /* User area I/O template */
        !            97: 
        !            98:        /*
        !            99:         * Set by ftoi.
        !           100:         */
        !           101:        ino_t    u_cdirn;               /* Child inode number */
        !           102:        struct   inode *u_cdiri;        /* Child inode pointer */
        !           103:        struct   inode *u_pdiri;        /* Parent inode pointer */
        !           104:        struct   direct u_direct;       /* Directory name */
        !           105: 
        !           106:        /*
        !           107:         * Accounting fields.
        !           108:         */
        !           109:        char     u_comm[U_COMM_LEN];    /* Command name */
        !           110: #ifdef _I386
        !           111:        char     u_sleep[10];           /* Reason for sleeping */
        !           112: #endif
        !           113:        time_t   u_btime;               /* Beginning time of process */
        !           114:        int      u_memuse;              /* Average memory usage */
        !           115:        long     u_block;               /* Count of disk blocks */
        !           116: 
        !           117:        /*
        !           118:         * Profiler fields.
        !           119:         */
        !           120:        vaddr_t  u_ppc;                 /* Profile pc from clock */
        !           121:        vaddr_t  u_pbase;               /* Profiler base */
        !           122:        vaddr_t  u_pbend;               /* Profiler base end */
        !           123: #ifdef _I386
        !           124:        off_t    u_pofft;               /* Offset from base */
        !           125:        off_t    u_pscale;              /* Scaling factor */
        !           126: #else
        !           127:        vaddr_t  u_pofft;               /* Offset from base */
        !           128:        vaddr_t  u_pscale;              /* Scaling factor */
        !           129: #endif
        !           130: 
        !           131:        /*
        !           132:         * Miscellaneous things.
        !           133:         */
        !           134:        int     u_argc;                 /* Argument count (for ps) */
        !           135:        unsigned u_argp;                /* Offset of argv[0] (for ps) */
        !           136:        int     u_signo;                /* Signal number (for debugger) */
        !           137: #ifdef _I386
        !           138:        int     *u_regl;
        !           139:        int     u_rval2;
        !           140:        void    (*u_sigreturn)();
        !           141:        struct _fpstate u_ndpCon;       /* ndp state */
        !           142:        int     u_ndpFlags;
        !           143: #endif
        !           144: } UPROC;
        !           145: 
        !           146: #endif

unix.superglobalmegacorp.com

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