home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / getpages.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.0 KB  |  77 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. #ifndef _SYS_GETPAGES_H
  11. #define _SYS_GETPAGES_H
  12.  
  13. #ident    "@(#)/usr/include/sys/getpages.h.sl 1.1 4.0 12/08/90 17570 AT&T-USL"
  14.  
  15. /*    The following list is used to keep track of regions locked
  16. **    by getpages.
  17. */
  18.  
  19. typedef struct {
  20.     reg_t    *gpr_rgptr;    /* Pointer to the region.    */
  21.     int    gpr_count;    /* Number of pages from this    */
  22.                 /* region in spglist and     */
  23.                 /* fpglist.            */
  24. } gprgl_t;
  25.  
  26. extern gprgl_t    gprglst[];
  27. extern int    gprgndx;
  28.  
  29.  
  30. /*    The following structure is used to maintain a list of
  31.  *    pages to be stolen by getpages.
  32.  */
  33.  
  34. typedef struct {
  35.     pte_t    *gp_ptptr;    /* Ptr to page table entry.    */
  36.     gprgl_t    *gp_rlptr;    /* Ptr to region list entry.    */
  37. } pglst_t;
  38.  
  39. /*    The following define sets the maximum size chunk which
  40.  *    getpages can swap out at once.  The tuneable parameter
  41.  *    tune.t_maxsc can never be made larger than this value.
  42.  */
  43.  
  44. #define MAXSPGLST    100
  45.  
  46. /*    The following list is used to accumulate pages which we
  47. **    wish to steal but which must be written to swap first.
  48. */
  49.  
  50. extern pglst_t    spglst[];
  51. extern int    spglndx;
  52.  
  53. /*    The following list is used to accumulate pages which we
  54. **    wish to steal and which have a current copy on swap or
  55. **    a file and thus do not require any I/O to be done before
  56. **    they can be stolen.  The reason for accummulating them
  57. **    in a list instead of free each page as it is found is
  58. **    to reduce the number of ATB purges required.
  59. */
  60.  
  61. #define    MAXFPGLST    100
  62.  
  63. extern pglst_t    fpglst[];
  64. extern int    fpglndx;
  65.  
  66.  
  67. /*    The following word is used to lock the getpages tables
  68. **    described above so that vhand and sched can't both
  69. **    use them at the same time.
  70. */
  71.  
  72. extern int    pglstlock;
  73. extern int    pglstlk();
  74. extern int    pglstunlk();
  75.  
  76. #endif    /* _SYS_GETPAGES_H */
  77.