* added compilers lcc and bcc (linux86)
[mascara-docs.git] / i86 / mtx / mtx / samples / LAB5.timer / type.h
blob2b64bc6c66ae1f923a77b6b019c4c4e25c86bf6a
1 typedef unsigned short ushort;
3 /*********** MTX Multitasking System ************/
5 #define NULL 0
6 #define NPROC 9
7 #define SSIZE 1024
8 #define NQUEUE NPROC // at most NPROC ready queues
10 #define FREE 0 // proc statuc
11 #define READY 1
12 #define SLEEP 2
13 #define ZOMBIE 3
16 typedef struct proc{
17 struct proc *next;
18 int *ksp; /* offset = 4 bytes */
20 int uss, usp; // at 4, 6
22 int pid; /* pid = 0 to NPROC-1 */
23 int status;
24 int pri; /* scheduling priority */
25 int ppid; /* parent pid */
27 struct proc *parent;
28 int event;
29 char *deathCry;
30 int exitValue;
32 char name[32];
33 int time;
35 int kstack[SSIZE]; // Kmode per process stack
36 }PROC;
38 struct rqueue{
39 int priority; // 0, 1,...NQUEUE-1
40 PROC *queue; // PROC queue of this priority level
43 extern struct rqueue rqueue[ ];
45 extern PROC proc[NPROC], *running, *freeList, *sleepList;
46 extern int nproc;