1: #include    <errno.h>
   2: #include    <sys/fperr.h>
   3: #include    <a.out.h>
   4: 
   5: /*
   6:  * The user structure.
   7:  * One allocated per process.
   8:  * Contains all per process data
   9:  * that doesn't need to be referenced
  10:  * while the process is swapped.
  11:  * The user block is USIZE*64 bytes
  12:  * long; resides at virtual kernel
  13:  * loc 0140000; contains the system
  14:  * stack per user; is cross referenced
  15:  * with the proc structure for the
  16:  * same process.
  17:  */
  18: 
  19: #define EXCLOSE 01
  20: 
  21: struct  user
  22: {
  23:     label_t u_rsav;         /* save info when exchanging stacks */
  24:     short   u_dummy;        /* historical dreg; u_fperr is below */
  25:     short   u_fpsaved;      /* FP regs saved for this proc */
  26:     struct {
  27:         short   u_fpsr;     /* FP status register */
  28:         double  u_fpregs[6];    /* FP registers */
  29:     } u_fps;
  30:     char    u_segflg;       /* IO flag: 0:user D; 1:system; 2:user I */
  31:     char    u_error;        /* return error code */
  32:     short   u_uid;          /* effective user id */
  33:     short   u_gid;          /* effective group id */
  34:     short   u_ruid;         /* real user id */
  35:     short   u_rgid;         /* real group id */
  36:     struct  proc    *u_procp;   /* pointer to proc structure */
  37:     short   *u_ap;          /* pointer to arglist */
  38:     union {             /* syscall return values */
  39:         struct  {
  40:             short   r_val1;
  41:             short   r_val2;
  42:         };
  43:         off_t   r_off;
  44:         time_t  r_time;
  45:     } u_r;
  46:     caddr_t u_base;         /* base address for IO */
  47:     u_short u_count;        /* bytes remaining for IO */
  48:     off_t   u_offset;       /* offset in file for IO */
  49:     struct  inode   *u_cdir;    /* inode of current directory */
  50:     struct  inode   *u_rdir;    /* root directory of current process */
  51:     char    u_dbuf[DIRSIZ];     /* current pathname component */
  52:     caddr_t u_dirp;         /* pathname pointer */
  53:     struct  direct  u_dent;     /* current directory entry */
  54:     struct  inode   *u_pdir;    /* inode of parent directory of dirp */
  55:     short   u_uisa[16];     /* segmentation address prototypes */
  56:     short   u_uisd[16];     /* segmentation descriptor prototypes */
  57:     struct  file    *u_ofile[NOFILE];/* pointers to file structures of open files */
  58:     char    u_pofile[NOFILE];   /* per-process flags of open files */
  59:     short   u_arg[5];       /* arguments to current system call */
  60:     size_t  u_tsize;        /* text size (clicks) */
  61:     size_t  u_dsize;        /* data size (clicks) */
  62:     size_t  u_ssize;        /* stack size (clicks) */
  63:     label_t u_qsav;         /* saved regs for interrupted syscall */
  64:     label_t u_ssav;         /* saved regs for newproc/expand */
  65:     short   (*u_signal[NSIG])();    /* disposition of signals */
  66:     time_t  u_utime;        /* this process's user time */
  67:     time_t  u_stime;        /* this process's system time */
  68:     time_t  u_cutime;       /* sum of children's utimes */
  69:     time_t  u_cstime;       /* sum of children's stimes */
  70:     short   *u_ar0;         /* address of user's saved R0 */
  71:     struct {            /* profile arguments */
  72:         short   *pr_base;   /* buffer base */
  73:         u_short pr_size;    /* buffer size */
  74:         u_short pr_off;     /* pc offset */
  75:         u_short pr_scale;   /* pc scaling */
  76:     } u_prof;
  77:     char    u_intflg;       /* catch intr from sys */
  78:     char    u_sep;          /* flag for I and D separation */
  79:     struct  tty *u_ttyp;    /* controlling tty pointer */
  80:     dev_t   u_ttyd;         /* controlling tty dev */
  81:     struct {            /* header of executable file */
  82:         short   ux_mag;     /* magic number */
  83:         u_short ux_tsize;   /* text size */
  84:         u_short ux_dsize;   /* data size */
  85:         u_short ux_bsize;   /* bss size */
  86:         u_short ux_ssize;   /* symbol table size */
  87:         u_short ux_entloc;  /* entry location */
  88:         u_short ux_unused;
  89:         u_short ux_relflg;
  90:     } u_exdata;
  91:     char    u_comm[DIRSIZ];
  92:     time_t  u_start;
  93:     char    u_acflag;
  94:     short   u_fpflag;       /* unused now, will be later */
  95:     short   u_cmask;        /* mask for file creation */
  96: #ifdef  UCB_LOGIN
  97:     short   u_login;        /* login flag: 0 or ttyslot */
  98:     char    u_crn[4];
  99: #endif
 100: #ifdef  MENLO_OVLY
 101:     struct  u_ovd   {       /* automatic overlay data */
 102:         short   uo_curov;   /* current overlay */
 103:         short   uo_ovbase;  /* base of overlay area, seg. */
 104:         u_short uo_dbase;   /* start of data, clicks */
 105:         u_short uo_ov_offst[1+NOVL];    /* overlay offsets in text */
 106:         short   uo_nseg;    /* number of overlay seg. regs. */
 107:     }   u_ovdata;
 108: #endif
 109:     struct  fperr   u_fperr;    /* floating point error save */
 110: #ifdef  MENLO_JCL
 111:     char    u_eosys;        /* action on syscall termination */
 112: #endif
 113: #ifdef  UCB_SYMLINKS
 114:     struct  buf *u_sbuf;        /* Buffer cache of symbolic name */
 115:     int u_slength;      /* Length of symbolic name */
 116:     int u_soffset;      /* Pointer into buffer */
 117: #endif
 118:     short   u_stack[1];
 119:                     /* kernel stack per user
 120: 					 * extends from u + USIZE*64
 121: 					 * backward not to reach here
 122: 					 */
 123: };
 124: 
 125: #ifdef  KERNEL
 126: extern  struct  user    u;
 127: #endif
 128: 
 129: #ifdef  MENLO_JCL
 130: /* u_eosys values */
 131: #define JUSTRETURN  0
 132: #define RESTARTSYS  1
 133: #define SIMULATERTI 2
 134: #endif

Defined struct's

u_ovd defined in line 101; used 2 times
user defined in line 21; used 24 times

Defined macros

EXCLOSE defined in line 19; used 4 times
JUSTRETURN defined in line 131; used 2 times
SIMULATERTI defined in line 133; used 2 times

Usage of this include

user.h used 81 times
Last modified: 1983-08-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1031
Valid CSS Valid XHTML 1.0 Strict