1: /*
   2:  * The user structure.
   3:  * One allocated per process.
   4:  * Contains all per process data
   5:  * that doesn't need to be referenced
   6:  * while the process is swapped.
   7:  * The user block is USIZE*64 bytes
   8:  * long; resides at virtual kernel
   9:  * loc 140000; contains the system
  10:  * stack per user; is cross referenced
  11:  * with the proc structure for the
  12:  * same process.
  13:  */
  14: struct user
  15: {
  16:     int u_rsav[2];      /* save r5,r6 when exchanging stacks */
  17:     int u_fsav[25];     /* save fp registers */
  18:                     /* rsav and fsav must be first in structure */
  19:     char    u_segflg;       /* flag for IO; user or kernel space */
  20:     char    u_error;        /* return error code */
  21:     char    u_uid;          /* effective user id */
  22:     char    u_gid;          /* effective group id */
  23:     char    u_ruid;         /* real user id */
  24:     char    u_rgid;         /* real group id */
  25:     int u_procp;        /* pointer to proc structure */
  26:     char    *u_base;        /* base address for IO */
  27:     char    *u_count;       /* bytes remaining for IO */
  28:     char    *u_offset[2];       /* offset in file for IO */
  29:     int *u_cdir;        /* pointer to inode of current directory */
  30:     char    u_dbuf[DIRSIZ];     /* current pathname component */
  31:     char    *u_dirp;        /* current pointer to inode */
  32:     struct  {           /* current directory entry */
  33:         int u_ino;
  34:         char    u_name[DIRSIZ];
  35:     } u_dent;
  36:     int *u_pdir;        /* inode of parent directory of dirp */
  37:     int u_uisa[16];     /* prototype of segmentation addresses */
  38:     int u_uisd[16];     /* prototype of segmentation descriptors */
  39:     int u_ofile[NOFILE];    /* pointers to file structures of open files */
  40:     int u_arg[5];       /* arguments to current system call */
  41:     int u_tsize;        /* text size (*64) */
  42:     int u_dsize;        /* data size (*64) */
  43:     int u_ssize;        /* stack size (*64) */
  44:     int u_sep;          /* flag for I and D separation */
  45:     int u_qsav[2];      /* label variable for quits and interrupts */
  46:     int u_ssav[2];      /* label variable for swapping */
  47:     int u_signal[NSIG];     /* disposition of signals */
  48:     int u_utime;        /* this process user time */
  49:     int u_stime;        /* this process system time */
  50:     int u_cutime[2];        /* sum of childs' utimes */
  51:     int u_cstime[2];        /* sum of childs' stimes */
  52:     int *u_ar0;         /* address of users saved R0 */
  53:     int u_prof[4];      /* profile arguments */
  54:     char    u_intflg;       /* catch intr from sys */
  55:                     /* kernel stack per user
  56: 					 * extends from u + USIZE*64
  57: 					 * backward not to reach here
  58: 					 */
  59: } u;
  60: 
  61: /* u_error codes */
  62: #define EFAULT  106
  63: #define EPERM   1
  64: #define ENOENT  2
  65: #define ESRCH   3
  66: #define EINTR   4
  67: #define EIO 5
  68: #define ENXIO   6
  69: #define E2BIG   7
  70: #define ENOEXEC 8
  71: #define EBADF   9
  72: #define ECHILD  10
  73: #define EAGAIN  11
  74: #define ENOMEM  12
  75: #define EACCES  13
  76: #define ENOTBLK 15
  77: #define EBUSY   16
  78: #define EEXIST  17
  79: #define EXDEV   18
  80: #define ENODEV  19
  81: #define ENOTDIR 20
  82: #define EISDIR  21
  83: #define EINVAL  22
  84: #define ENFILE  23
  85: #define EMFILE  24
  86: #define ENOTTY  25
  87: #define ETXTBSY 26
  88: #define EFBIG   27
  89: #define ENOSPC  28
  90: #define ESPIPE  29
  91: #define EROFS   30
  92: #define EMLINK  31
  93: #define EPIPE   32

Defined variables

u defined in line 59; used 575 times

Defined struct's

user defined in line 14; used 2 times

Defined macros

E2BIG defined in line 69; used 1 times
EACCES defined in line 75; used 1 times
EAGAIN defined in line 73; used 1 times
EBADF defined in line 71; used 2 times
EBUSY defined in line 77; used 2 times
ECHILD defined in line 72; used 1 times
EEXIST defined in line 78; used 2 times
EFAULT defined in line 62; used 5 times
EFBIG defined in line 88; used 1 times
EINTR defined in line 66; used 1 times
EINVAL defined in line 83; used 2 times
EIO defined in line 67; used 6 times
EISDIR defined in line 82; used 1 times
EMFILE defined in line 85; used 1 times
EMLINK defined in line 92; used 1 times
ENFILE defined in line 84; used 2 times
ENODEV defined in line 80; used 1 times
ENOENT defined in line 64; used 2 times
ENOEXEC defined in line 70; used 1 times
ENOMEM defined in line 74; used 1 times
ENOSPC defined in line 89; used 2 times
ENOTBLK defined in line 76; used 1 times
ENOTDIR defined in line 81; used 2 times
ENOTTY defined in line 86; used 1 times
EPERM defined in line 63; used 1 times
EPIPE defined in line 93; used 1 times
EROFS defined in line 91; used 1 times
ESPIPE defined in line 90; used 1 times
ESRCH defined in line 65; used 2 times
ETXTBSY defined in line 87; used 2 times
EXDEV defined in line 79; used 1 times

Usage of this include

Last modified: 1975-07-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1718
Valid CSS Valid XHTML 1.0 Strict