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