| 1 | /* text.h 2.1 1/5/80 */ |
| 2 | |
| 3 | /* |
| 4 | * Text structure. |
| 5 | * One allocated per pure |
| 6 | * procedure on swap device. |
| 7 | * Manipulated by text.c |
| 8 | */ |
| 9 | struct text |
| 10 | { |
| 11 | swblk_t x_daddr; /* disk address of segment */ |
| 12 | size_t x_size; /* size (clicks) */ |
| 13 | struct proc *x_caddr; /* ptr to linked proc, if loaded */ |
| 14 | struct inode *x_iptr; /* inode of prototype */ |
| 15 | short x_rssize; |
| 16 | short x_swrss; |
| 17 | char x_count; /* reference count */ |
| 18 | char x_ccount; /* number of loaded references */ |
| 19 | char x_flag; /* traced, written flags */ |
| 20 | char x_slptime; |
| 21 | short x_poip; /* page out in progress count */ |
| 22 | }; |
| 23 | |
| 24 | #ifdef KERNEL |
| 25 | extern struct text text[]; |
| 26 | #endif |
| 27 | |
| 28 | #define XTRC 01 /* Text may be written, exclusive use */ |
| 29 | #define XWRIT 02 /* Text written into, must swap out */ |
| 30 | #define XLOAD 04 /* Currently being read from file */ |
| 31 | #define XLOCK 010 /* Being swapped in or out */ |
| 32 | #define XWANT 020 /* Wanted for swapping */ |
| 33 | #define XPAGI 040 /* Page in on demand from inode */ |