1: /*
2: * Copyright (c) 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 1.2 (2.11BSD GTE) 1/19/95
7: */
8:
9: #ifndef _SYS_TEXT_H_
10: #define _SYS_TEXT_H_
11:
12: /*
13: * Text structure. XXX REF COUNT should be short
14: * One allocated per pure
15: * procedure on swap device.
16: * Manipulated by text.c
17: */
18: struct text
19: {
20: struct text *x_forw; /* forward link in free list */
21: struct text **x_back; /* backward link in free list */
22: short x_daddr; /* segment's disk address */
23: short x_caddr; /* core address, if loaded */
24: size_t x_size; /* size (clicks) */
25: struct inode *x_iptr; /* inode of prototype */
26: u_char x_count; /* reference count */
27: u_char x_ccount; /* number of loaded references */
28: u_char x_flag; /* traced, written flags */
29: char dummy; /* room for one more */
30: };
31:
32: #if defined(KERNEL) && !defined(SUPERVISOR)
33: extern struct text text[], *textNTEXT;
34: int ntext;
35: #endif
36:
37: #define XTRC 0x01 /* Text may be written, exclusive use */
38: #define XWRIT 0x02 /* Text written into, must swap out */
39: #define XLOAD 0x04 /* Currently being read from file */
40: #define XLOCK 0x08 /* Being swapped in or out */
41: #define XWANT 0x10 /* Wanted for swapping */
42: #define XPAGI 0x20 /* Page in on demand from inode */
43: #define XUNUSED 0x40 /* unused since swapped out for cache */
44:
45: /* arguments to xswap: */
46: #define X_OLDSIZE (-1) /* the old size is the same as current */
47: #define X_DONTFREE 0 /* save core image (for parent in newproc) */
48: #define X_FREECORE 1 /* free core space after swap */
49:
50: /*
51: * Text table statistics
52: */
53: struct xstats {
54: u_long alloc; /* calls to xalloc */
55: u_long alloc_inuse; /* found in use/sticky */
56: u_long alloc_cachehit; /* found in cache */
57: u_long alloc_cacheflush; /* flushed cached text */
58: u_long alloc_unused; /* flushed unused cached text */
59: u_long free; /* calls to xfree */
60: u_long free_inuse; /* still in use/sticky */
61: u_long free_cache; /* placed in cache */
62: u_long free_cacheswap; /* swapped out to place in cache */
63: };
64: #endif /* _SYS_TEXT_H_ */
Defined variables
ntext
defined in line
34; used 23 times
Defined struct's
text
defined in line
18; used 88 times
- in line 20-21(4),
33(2)
- in /usr/src/sys/CURLY/param.c line
67(2),
147(2)
- in /usr/src/sys/GENERIC/param.c line
67(2),
147(2)
- in /usr/src/sys/QT/param.c line
67(2),
147(2)
- in /usr/src/sys/conf/param.c line
67(2),
147(2)
- in /usr/src/sys/h/sysctl.h line
199-200(4)
- in /usr/src/sys/sys/kern_mman.c line
218(2)
- in /usr/src/sys/sys/kern_sysctl.c line
790-791(4)
- in /usr/src/sys/sys/sys_process.c line
88(2)
- in /usr/src/sys/sys/vm_sched.c line
203(2)
- in /usr/src/sys/sys/vm_swap.c line
29(2)
- in /usr/src/sys/sys/vm_text.c line
65(2),
75(2),
89(2),
143(2),
254(2),
278(2),
288(2),
296(2),
308(2),
332(2),
345(2),
370(2)
- in /usr/src/ucb/PORT/systat/swap.c line
57(2),
225(4),
254-260(8)
- in /usr/src/usr.bin/fstat/fstat.c line
297(2)
- in /usr/src/usr.sbin/pstat/pstat.c line
300-307(8),
319(2)
Defined macros
XLOAD
defined in line
39; used 5 times
XLOCK
defined in line
40; used 8 times
XPAGI
defined in line
42; used 2 times
XTRC
defined in line
37; used 4 times
XWANT
defined in line
41; used 4 times
XWRIT
defined in line
38; used 8 times
Usage of this include