home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / vm / seg_kmem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.4 KB  |  89 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_SEG_KMEM_H
  34. #define _VM_SEG_KMEM_H
  35.  
  36. #ident    "@(#)/usr/include/vm/seg_kmem.h.sl 1.1 4.0 12/08/90 46653 AT&T-USL"
  37.  
  38. /*
  39.  * VM - Kernel Segment Driver
  40.  */
  41.  
  42. /*
  43.  * These variables should be put in a place which
  44.  * is guaranteed not to get paged out of memory.
  45.  */
  46. extern struct as kas;            /* kernel's address space */
  47. extern struct seg kpseg;        /* kernel's "ptov" segment */
  48. extern struct seg kvseg;        /* kernel's "sptalloc" segment */
  49. extern struct seg ktextseg;        /* kernel's "most everything else" segment */
  50. extern struct seg kpioseg;        /* kernel's "pioseg" segment */
  51.  
  52. #if defined(__STDC__)
  53.  
  54. extern int sptalloc(int, int, caddr_t, int);
  55. extern void sptfree(caddr_t, int, int);
  56.  
  57. /*
  58.  * For segkmem_create, the argsp is actually a pointer to the
  59.  * optional array of pte's used to map the given segment.
  60.  */
  61. extern int segkmem_create(struct seg *, void *);
  62.  
  63. extern caddr_t kseg(int);
  64. extern void unkseg(caddr_t);
  65.  
  66. #else
  67.  
  68. extern int sptalloc();
  69. extern void sptfree();
  70. extern int segkmem_create();
  71. extern caddr_t kseg();
  72. extern void unkseg();
  73.  
  74. #endif /* __STDC__ */
  75.  
  76. /*
  77.  * Flags to pass to segkmem_mapin().
  78.  */
  79. #define PTELD_LOCK    0x01
  80. #define PTELD_INTREP    0x02
  81. #define PTELD_NOSYNC    0x04
  82.  
  83. typedef struct kseg_list {
  84. caddr_t    kseg_vaddr;            /* virtual address of kseg */
  85. int kseg_size;                /* size of kseg request in clicks */
  86. struct kseg_list *kseg_next;            /* link */
  87. } kseg_list_t;
  88. #endif    /* _VM_SEG_KMEM_H */
  89.