home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / vm / as.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  3.0 KB  |  105 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. /*
  11.  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  12.  *         PROPRIETARY NOTICE (Combined)
  13.  * 
  14.  * This source code is unpublished proprietary information
  15.  * constituting, or derived under license from AT&T's UNIX(r) System V.
  16.  * In addition, portions of such source code were derived from Berkeley
  17.  * 4.3 BSD under license from the Regents of the University of
  18.  * California.
  19.  * 
  20.  * 
  21.  * 
  22.  *         Copyright Notice 
  23.  * 
  24.  * Notice of copyright on this source code product does not indicate 
  25.  * publication.
  26.  * 
  27.  *     (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  28.  *     (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  29.  *               All rights reserved.
  30.  *  
  31.  */
  32.  
  33. #ifndef _VM_AS_H
  34. #define _VM_AS_H
  35.  
  36. #ident    "@(#)/usr/include/vm/as.h.sl 1.1 4.0 12/08/90 22684 AT&T-USL"
  37.  
  38. #include "vm/faultcode.h"
  39. #include "vm/vm_hat.h"
  40.  
  41. /*
  42.  * VM - Address spaces.
  43.  */
  44.  
  45. /*
  46.  * Each address space consists of a list of sorted segments
  47.  * and machine dependent address translation information.
  48.  *
  49.  * All the hard work is in the segment drivers and the
  50.  * hardware address translation code.
  51.  */
  52. struct as {
  53.     u_int    a_lock: 1;
  54.     u_int    a_want: 1;
  55.     u_int    a_paglck: 1;
  56.     u_int    : 13;
  57.     u_short    a_keepcnt;    /* number of `keeps' */
  58.     struct    seg *a_segs;    /* segments in this address space */
  59.     struct    seg *a_seglast;    /* last segment hit on the address space */
  60.     size_t    a_size;        /* size of address space */
  61.     size_t    a_rss;        /* memory claim for this address space */
  62.     struct    hat a_hat;    /* hardware address translation */
  63. };
  64.  
  65. #ifdef _KERNEL
  66.  
  67. /*
  68.  * Flags for as_gap.
  69.  */
  70. #define AH_DIR        0x1    /* direction flag mask */
  71. #define AH_LO        0x0    /* find lowest hole */
  72. #define AH_HI        0x1    /* find highest hole */
  73. #define AH_CONTAIN    0x2    /* hole must contain `addr' */
  74.  
  75. #ifdef __STDC__
  76. extern size_t rm_assize(struct as *);
  77. extern int as_lock(struct as *, int, u_int);
  78. #else
  79. extern size_t rm_assize();
  80. extern int as_lock();
  81. #endif
  82.  
  83. struct    seg *as_segat(/* as, addr */);
  84. struct    as *as_alloc();
  85. void    as_free(/* as */);
  86. struct    as *as_dup(/* as */);
  87. int    as_addseg(/* as, seg */);
  88. faultcode_t as_fault(/* as, addr, size, type, rw */);
  89. faultcode_t as_faulta(/* as, addr, size */);
  90. int     as_setprot(/* as, addr, size, prot */);
  91. int    as_checkprot(/* as, addr, size, prot */);
  92. int    as_unmap(/* as, addr, size */);
  93. int    as_map(/* as, addr, size, crfp, crargsp */);
  94. int    as_gap(/* as, minlen, basep, lenp, flags, addr */);
  95. int    as_memory(/* as, addrp, sizep */);
  96. u_int    as_swapout(/* as */);
  97. int    as_incore(/* as, addr, size, vecp, sizep */);
  98. int    as_ctl(/* as, addr, size, func, attr, arg, bitmap, pos */);
  99. u_int    as_getprot(/* as, addr, naddrp */);
  100.  
  101. struct anon_map *as_shmlookup(/* as, addr */);
  102. #endif /* _KERNEL */
  103.  
  104. #endif    /* _VM_AS_H */
  105.