4 /* Process management definitions : */
5 /* maximum number of processes on one node */
7 /* maximum number of waiting messages */
10 /* message length defined by me (PS) */
16 /* during generation of process object */
18 /* non-active process (suspended by STOP) */
20 /* active process (ready to execute) */
22 /* waiting for NEW of another process */
24 /* waiting for remote procedure call */
26 /* during execution of ACCEPT statement */
28 /* waiting for process prototype */
31 /* Process descriptor : */
35 /* TRUE if in use by some process */
38 /* process mark for proper detecting of none */
44 /* process prototype number */
47 /* pointer to memory array */
50 union value param[MAXPARAM];
52 /* instruction counter */
55 /* trace line number */
58 /* first word of object area */
61 /* last word in memory */
64 /* last word used by objects */
67 /* first word used by dictionary */
70 /* head of free dictionary item list */
73 /* head of killed object list for size > 2 */
76 /* head of killed object list for size = 2 */
79 /* am of process object */
82 /* process object virtual address */
85 /* remote process or procedure template */
88 /* pointers to current object */
91 /* adress of object just left */
94 /* used for LBLOCK1, LBLOCK2, LBLOCK3 */
97 /* queue of messages for this process */
100 /* queue of disabled RPC messages */
103 /* stack of set of enabled remote procedures */
106 /* next allocate will forace compact */
107 bool force_compactification;
109 /* table of pointers to processes in process */
117 * \defgroup MessageType Message type
123 /** resume request */
125 /** create new process request */
127 /** create process acknowledge */
131 /** remote procedure call request */
133 /** remote procedure return */
135 /** ask for process prototype */
137 /** answer with process prototype */
150 /** address of the sender and */
153 /** receiver of the message */
159 /** prototype or error signal number */
163 #define MAXPROCPAR (MSGLENGTH-sizeof(struct ctrlmsg))
167 struct ctrlmsg control;
168 char params[MAXPROCPAR];
171 /* Direction of copying of parameters (for moveparams()): */
178 /** process descriptor table */
179 extern procdescr process[];
181 /** pointer to current process descriptor */
182 extern procdescr *thisp;
184 /** current process index */
187 /** Round-Robin queue of ready processes */
190 /** TRUE if operating in D-Link network */
193 /** queue of waiting messages */
194 extern message globmsgqueue[];
196 /** number of waiting messages */
199 /** pointers to message queue */
200 extern int msghead, msgtail;
202 /** this machine node number */
205 /** console node number */
208 /** TRUE if remote node */
211 /** TRUE if rescheduling is mandatory */
212 extern bool reschedule;
215 /** pointer to Global Info Segment */
216 extern PGINFOSEG ginf;
221 #ifndef NO_PROTOTYPES
222 void obj2mess(word *,virtaddr *,procaddr*);
223 void mess2obj(procdescr *,procaddr *,virtaddr*);
224 bool isprocess(virtaddr *);
225 void hash_find(procaddr *,virtaddr *);
226 void hash_create(procdescr *,int);
227 void hash_set(procaddr *,word);