|
|
1.1 root 1: #include <tty.h>
2:
1.1.1.2 ! root 3: #ifndef PROC_H
! 4: #define PROC_H
1.1 root 5: extern int NPROC;
1.1.1.2 ! root 6: #define STKSIZ (4096-sizeof(struct _*))
1.1 root 7: #define CBSIZE 64 /* NPROC*CBSIZE <= queue.h/NCHARS */
8:
9: #ifndef QUEUE_H
10: struct clist {
1.1.1.2 ! root 11: long c_tail;
! 12: long c_head;
1.1 root 13: short c_cc;
14: short state;
15: };
16: #endif
17: struct pcb {
18: int psw;
19: char (*pc)();
20: int sp;
21: int lower;
22: int upper;
23: int ap;
24: int fp;
25: int reg[9]; /* 9 user registers */
26: int blkmv;
27: };
28: struct Proc {
29: struct pcb pcb;
30: char *text;
31: char *data;
32: char *bss;
33: int state;
34: Layer * layer;
35: Rectangle rect; /* rectangle on screen */
36: struct clist kbdqueue;
37: char **traploc;
38: int *traptype;
39: int nticks;
40: Texture * cursor;
41: short inhibited;
42: short nchars;
43: unsigned char cbuf[CBSIZE*3]; /* circular buffer */
44: unsigned char *cbufpin, *cbufpout;
45: struct ttychars ttychars; /* chars for tty driver emulation */
46: int stack[STKSIZ/sizeof(int)]; /* int for alignment */
1.1.1.2 ! root 47: struct Font *defaultfont;
1.1 root 48: };
49:
1.1.1.2 ! root 50: struct Nqueue { /* structure used by putname / getname */
! 51: struct Nqueue *next;
! 52: struct Proc *proc;
! 53: long data;
! 54: char name[4];
! 55: };
1.1 root 56:
57: #ifndef MUX_H
58: # ifdef TASK_C
59: struct Proc *newproc();
60: # else
61: extern struct Proc *newproc();
62: # endif
63: extern struct Proc *P;
64: extern struct Proc proctab[];
65: #endif
66:
67: #ifdef MUXTERM
68: /*
69: * Data at start of user program
70: */
71: struct udata {
72: Rectangle Drect;
73: Layer * Jdisplayp;
74: int argc;
75: char **argv;
76: struct Mouse mouse;
77: };
78: /* states */
79: #define RUN 1 /* ready to be scheduled */
80: #define BUSY 2 /* active */
81: #define BLOCKED 4 /* blocked by user with ^S */
82: #define USER 8 /* a user-68ld'd process */
83: #define KBDLOCAL 16 /* has requested the KBD */
84: #define MOUSELOCAL 32 /* has requested the MOUSE */
85: #define GOTMOUSE 64 /* currently owns MOUSE */
86: #define WAKEUP 128 /* tell CONTROL to issue setrun(p) */
87: #define MOVED 256 /* layer got moved */
88: #define UNBLOCKED 512 /* Has been unblocked */
89: #define ZOMBIE 1024 /* proc died horribly; waiting for debugger */
90: #define RESHAPED 2048 /* layer got reshaped */
91: #define ZOMBOOT 4096 /* put in ZOMBIE state after booting */
92: #define ALARMREQD 8192 /* has requested an alarm */
93:
94: #define setrun(p) ((p)->state|=RUN)
95: #define setnorun(p) ((p)->state&=~RUN)
96:
97: #else
98: #define MOVED 256 /* layer got moved */
99: #define RESHAPED 2048 /* layer got reshaped */
100: #endif MUXTERM
1.1.1.2 ! root 101: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.