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

Defined struct's

xstats defined in line 53; used 6 times

Defined macros

XPAGI defined in line 42; used 2 times
XUNUSED defined in line 43; used 4 times
XWANT defined in line 41; used 4 times
X_DONTFREE defined in line 47; used 1 times
_SYS_TEXT_H_ defined in line 10; used 1 times
  • in line 9

Usage of this include

Last modified: 1995-01-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3030
Valid CSS Valid XHTML 1.0 Strict