Add em22 compile, change EM machine executable format to put proc table in text
[Ack-5.5.git] / util / int / proctab.c
1 /*
2         Handling the proctable
3 */
4
5 /* $Id: proctab.c,v 2.3 1994/06/24 10:48:37 ceriel Exp $ */
6
7 #include        "logging.h"
8 #include        "global.h"
9 #include        "log.h"
10 #include        "memdirect.h"
11 #include        "text.h"
12 #include        "proctab.h"
13
14 struct proc proctab; /* changes when PI changes */
15
16 read_proctab(p, pt)
17         register ptr p;
18         register struct proc *pt;
19 {
20         p *= psize * 3;
21         pt->pr_nloc = p_in_text(p);
22         p += psize;
23         pt->pr_ep = p_in_text(p);
24         p += psize;
25         pt->pr_ff = pt->pr_ep + p_in_text(p);
26 }
27
28 #ifdef  LOGGING
29 dump_proctab()
30 {
31         register long p;
32
33         if (!check_log(" r6"))
34                 return;
35
36         for (p = 0; p < NProc; p++) {
37                 struct proc pt;
38
39                 read_proctab(p, &pt);
40                 LOG((" r5: proctab[%ld]: nloc = %d, ep = %lu, ff = %lu",
41                                 p, pt.pr_nloc, pt.pr_ep, pt.pr_ff));
42         }
43 }
44 #endif  /* LOGGING */
45