Annotation of coherent/f/usr/include/sys/uproc.h, revision 1.1.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/uproc.h
                      8:  *
                      9:  * The user process area.
                     10:  *
                     11:  * Revised: Wed May 26 16:45:05 1993 CDT
                     12:  */
                     13: 
                     14: #ifndef         __SYS_UPROC_H__
                     15: #define         __SYS_UPROC_H__
                     16: 
                     17: #include <common/feature.h>
                     18: #include <common/_time.h>
                     19: #include <kernel/sigproc.h>
                     20: #if    _I386
                     21: #include <kernel/reg.h>
                     22: #include <kernel/param.h>
                     23: #include <ieeefp.h>
                     24: #else
                     25: #include <kernel/machine.h>
                     26: #include <kernel/const.h>
                     27: #endif
                     28: #include <sys/types.h>
                     29: #include <dirent.h>
                     30: #include <sys/io.h>
                     31: #include <sys/proc.h>
                     32: 
                     33: /*
                     34:  * NIGEL: This is a quick hack; we have removed the definition of the old
                     35:  * "struct direct" from anywhere that user code can see. We are still using
                     36:  * this for the kernel pending development of proper layering in the file-
                     37:  * system interface.
                     38:  */
                     39: 
                     40: #if    ! DIRSIZ
                     41: # define       DIRSIZ          14
                     42: #endif
                     43: 
                     44: struct direct {
                     45:        ino_t           d_ino;
                     46:        char            d_name [DIRSIZ];
                     47: };
                     48: 
                     49: 
                     50: /*
                     51:  * User process structure.
                     52:  *
                     53:  * Remember to update UPROC_VERSION whenever you change this struct.
                     54:  *
                     55:  * U_OFFSET is the byte offset of uproc within segment SIUSERP.
                     56:  * See also the definition of "u" at start of as.s.
                     57:  */
                     58: #define U_OFFSET       0xB00
                     59: #define U_COMM_LEN     10
                     60: #define U_SLEEP_LEN    10
                     61: 
                     62: typedef struct uproc {
                     63: #if    _I386
                     64:        /* Magic number UPROC_VERSION identifies this uproc struct.  */
                     65: #define UPROC_VERSION 0x0107
                     66:        unsigned short u_version;       /* Version number for uproc struct */
                     67: #endif /* _I386 */
                     68:        int      u_error;               /* Error number (must be first) */
                     69:        char     u_flag;                /* Flags (for accounting) */
                     70:        int      u_uid;                 /* User id */
                     71:        int      u_gid;                 /* Group id */
                     72:        int      u_ruid;                /* Real user id */
                     73:        int      u_rgid;                /* Real group id */
                     74:        int      u_euid;                /* Effective user id */
                     75:        int      u_egid;                /* Effective group id */
                     76:        unsigned u_umask;               /* Mask for file creation */
                     77:        struct   inode *u_cdir;         /* Current working directory */
                     78:        struct   inode *u_rdir;         /* Current root directory */
                     79:        struct __tagged_fd
                     80:               * u_filep[NOFILE];       /* Open files */
                     81:        struct   sr u_segl[NUSEG];      /* User segment descriptions */
                     82: 
                     83:        __sigaction_t   u_sigact [NSIG];/* Signal action information */
                     84: 
                     85:        /*
                     86:         * System working area.
                     87:         */
                     88:        struct   seg *u_sege[NUSEG];    /* Exec segment descriptors */
                     89:        MPROTO   u_sproto;              /* User prototype */
                     90:        MCON     u_syscon;              /* System context save */
                     91:        MENV     u_sigenv;              /* Signal return */
                     92:        MGEN     u_sysgen;              /* General purpose area */
                     93: #if    0
                     94:        int     u_args [MSACOUNT];
                     95:        struct   io u_io;               /* User area I/O template */
                     96:        struct   direct u_direct;       /* Directory name */
                     97: #endif
                     98: #if    ! _I386
                     99:        int      u_args [__DIVIDE_ROUNDUP_CONST (MSASIZE, sizeof (int)];
                    100: #endif
                    101: 
                    102:        /*
                    103:         * Set by ftoi.
                    104:         */
                    105: 
                    106:        ino_t    u_cdirn;               /* Child inode number */
                    107:        struct   inode *u_cdiri;        /* Child inode pointer */
                    108:        struct   inode *u_pdiri;        /* Parent inode pointer */
                    109: 
                    110:        /*
                    111:         * Accounting fields.
                    112:         */
                    113:        char     u_comm[U_COMM_LEN];    /* Command name */
                    114: #if    _I386
                    115:        char     u_sleep[U_SLEEP_LEN];  /* Reason for sleeping */
                    116: #endif
                    117:        time_t   u_btime;               /* Beginning time of process */
                    118:        int      u_memuse;              /* Average memory usage */
                    119:        long     u_block;               /* Count of disk blocks */
                    120: 
                    121:        /*
                    122:         * Profiler fields.
                    123:         */
                    124:        caddr_t  u_ppc;                 /* Profile pc from clock */
                    125:        caddr_t  u_pbase;               /* Profiler base */
                    126:        caddr_t  u_pbend;               /* Profiler base end */
                    127: #if    _I386
                    128:        off_t    u_pofft;               /* Offset from base */
                    129:        off_t    u_pscale;              /* Scaling factor */
                    130: #else
                    131:        vaddr_t  u_pofft;               /* Offset from base */
                    132:        vaddr_t  u_pscale;              /* Scaling factor */
                    133: #endif
                    134: 
                    135:        /*
                    136:         * Miscellaneous things.
                    137:         */
                    138:        int     u_argc;                 /* Argument count (for ps) */
                    139:        unsigned u_argp;                /* Offset of argv[0] (for ps) */
                    140:        int     u_signo;                /* Signal number (for debugger) */
                    141: #if    _I386
                    142: #if    0
                    143:        int     *u_regl;
                    144: #endif
                    145:        int     u_rval2;
                    146:        __sigfunc_t     u_sigreturn;
                    147:        union _fpcontext        u_ndpCon;       /* ndp state */
                    148:        int     u_ndpFlags;
                    149:        int     u_bpfmax;               /* max blocks per file */
                    150: 
                    151:        char    u_nigel [32];           /* for STREAMS */
                    152: #endif
                    153: } UPROC;
                    154: 
                    155: #endif /* ! defined (__SYS_UPROC_H__) */

unix.superglobalmegacorp.com

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