|
|
1.1 ! root 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.2 (Berkeley) 10/13/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: #if defined(tahoe) ! 34: short x_ckey; /* code cache key */ ! 35: #endif ! 36: }; ! 37: ! 38: #ifdef KERNEL ! 39: struct text *text, *textNTEXT; ! 40: int ntext; ! 41: #endif ! 42: ! 43: #define XTRC 0x01 /* Text may be written, exclusive use */ ! 44: #define XWRIT 0x02 /* Text written into, must swap out */ ! 45: #define XLOAD 0x04 /* Currently being read from file */ ! 46: #define XLOCK 0x08 /* Being swapped in or out */ ! 47: #define XWANT 0x10 /* Wanted for swapping */ ! 48: #define XPAGI 0x20 /* Page in on demand from inode */ ! 49: #define XUNUSED 0x40 /* unused since swapped out for cache */ ! 50: ! 51: /* ! 52: * Text table statistics ! 53: */ ! 54: struct xstats { ! 55: u_long alloc; /* calls to xalloc */ ! 56: u_long alloc_inuse; /* found in use/sticky */ ! 57: u_long alloc_cachehit; /* found in cache */ ! 58: u_long alloc_cacheflush; /* flushed cached text */ ! 59: u_long alloc_unused; /* flushed unused cached text */ ! 60: u_long free; /* calls to xfree */ ! 61: u_long free_inuse; /* still in use/sticky */ ! 62: u_long free_cache; /* placed in cache */ ! 63: u_long free_cacheswap; /* swapped out to place in cache */ ! 64: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.