1: /*
2: * Copyright (c) 1982, 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)text.h 7.1 (Berkeley) 6/4/86
7: */
8:
9: /*
10: * Text structure.
11: * One allocated per pure
12: * procedure on swap device.
13: * Manipulated by text.c
14: */
15: #define NXDAD 12 /* param.h:MAXTSIZ / vmparam.h:DMTEXT */
16:
17: struct text
18: {
19: struct text *x_forw; /* forward link in free list */
20: struct text **x_back; /* backward link in free list */
21: swblk_t x_daddr[NXDAD]; /* disk addresses of dmtext-page segments */
22: swblk_t x_ptdaddr; /* disk address of page table */
23: size_t x_size; /* size (clicks) */
24: struct proc *x_caddr; /* ptr to linked proc, if loaded */
25: struct inode *x_iptr; /* inode of prototype */
26: short x_rssize;
27: short x_swrss;
28: short x_count; /* reference count */
29: short x_ccount; /* number of loaded references */
30: char x_flag; /* traced, written flags */
31: char x_slptime;
32: short x_poip; /* page out in progress count */
33: };
34:
35: #ifdef KERNEL
36: struct text *text, *textNTEXT;
37: int ntext;
38: #endif
39:
40: #define XTRC 0x01 /* Text may be written, exclusive use */
41: #define XWRIT 0x02 /* Text written into, must swap out */
42: #define XLOAD 0x04 /* Currently being read from file */
43: #define XLOCK 0x08 /* Being swapped in or out */
44: #define XWANT 0x10 /* Wanted for swapping */
45: #define XPAGI 0x20 /* Page in on demand from inode */
46: #define XUNUSED 0x40 /* unused since swapped out for cache */
47:
48: /*
49: * Text table statistics
50: */
51: struct xstats {
52: u_long alloc; /* calls to xalloc */
53: u_long alloc_inuse; /* found in use/sticky */
54: u_long alloc_cachehit; /* found in cache */
55: u_long alloc_cacheflush; /* flushed cached text */
56: u_long alloc_unused; /* flushed unused cached text */
57: u_long free; /* calls to xfree */
58: u_long free_inuse; /* still in use/sticky */
59: u_long free_cache; /* placed in cache */
60: u_long free_cacheswap; /* swapped out to place in cache */
61: };
Defined variables
ntext
defined in line
37; used 2 times
text
defined in line
36; used 11 times
Defined struct's
text
defined in line
17; used 62 times
- in line 19-20(4),
36(2)
- in /usr/src/sys/GENERIC/param.c line
72(2)
- in /usr/src/sys/conf/param.c line
72(2)
- in /usr/src/sys/sys/sys_process.c line
107(2)
- in /usr/src/sys/sys/vm_drum.c line
110(2),
144(2)
- in /usr/src/sys/sys/vm_page.c line
761(2),
966(2)
- in /usr/src/sys/sys/vm_pt.c line
82(2),
149(2)
- in /usr/src/sys/sys/vm_sched.c line
353(2)
- in /usr/src/sys/sys/vm_swap.c line
28(2)
- in /usr/src/sys/sys/vm_text.c line
76(2),
86(2),
101(2),
152(2),
232(2),
242(2),
250(2),
262(2),
289(2),
309(2),
333(2),
356(2),
369(2),
395(2)
- in /usr/src/sys/vax/genassym.c line
44(4)
- in /usr/src/sys/vax/machdep.c line
113(2)
Defined macros
NXDAD
defined in line
15; used 4 times
XLOAD
defined in line
42; used 4 times
XLOCK
defined in line
43; used 8 times
XPAGI
defined in line
45; used 5 times
XTRC
defined in line
40; used 3 times
XWANT
defined in line
44; used 3 times
XWRIT
defined in line
41; used 6 times
Usage of this include