Annotation of src/sys/uvm/uvm_extern.h, Revision 1.48
1.48 ! thorpej 1: /* $NetBSD: uvm_extern.h,v 1.47 2000/08/01 00:53:09 wiz Exp $ */
1.1 mrg 2:
3: /*
4: *
5: * Copyright (c) 1997 Charles D. Cranor and Washington University.
6: * All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: * 3. All advertising materials mentioning features or use of this software
17: * must display the following acknowledgement:
18: * This product includes software developed by Charles D. Cranor and
19: * Washington University.
20: * 4. The name of the author may not be used to endorse or promote products
21: * derived from this software without specific prior written permission.
22: *
23: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.4 mrg 33: *
34: * from: Id: uvm_extern.h,v 1.1.2.21 1998/02/07 01:16:53 chs Exp
1.1 mrg 35: */
36:
1.44 mrg 37: /*-
1.45 mrg 38: * Copyright (c) 1991, 1992, 1993
1.44 mrg 39: * The Regents of the University of California. All rights reserved.
40: *
41: * Redistribution and use in source and binary forms, with or without
42: * modification, are permitted provided that the following conditions
43: * are met:
44: * 1. Redistributions of source code must retain the above copyright
45: * notice, this list of conditions and the following disclaimer.
46: * 2. Redistributions in binary form must reproduce the above copyright
47: * notice, this list of conditions and the following disclaimer in the
48: * documentation and/or other materials provided with the distribution.
49: * 3. All advertising materials mentioning features or use of this software
50: * must display the following acknowledgement:
51: * This product includes software developed by the University of
52: * California, Berkeley and its contributors.
53: * 4. Neither the name of the University nor the names of its contributors
54: * may be used to endorse or promote products derived from this software
55: * without specific prior written permission.
56: *
57: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
58: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
59: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
60: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
61: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
62: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
63: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
64: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
65: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
66: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
67: * SUCH DAMAGE.
68: *
69: * @(#)vm_extern.h 8.5 (Berkeley) 5/3/95
70: */
71:
1.8 perry 72: #ifndef _UVM_UVM_EXTERN_H_
73: #define _UVM_UVM_EXTERN_H_
1.1 mrg 74:
75: /*
76: * uvm_extern.h: this file defines the external interface to the VM system.
77: *
78: * this should be the only file included by non-VM parts of the kernel
79: * which need access to VM services. if you want to know the interface
80: * to the MI VM layer without knowing the details, this is the file to
81: * learn.
82: *
83: * NOTE: vm system calls are prototyped in syscallargs.h
84: */
85:
86: /*
1.45 mrg 87: * typedefs, necessary for standard UVM headers.
88: */
89:
90: typedef unsigned int uvm_flag_t;
91: typedef int vm_fault_t;
92:
93: typedef int vm_inherit_t; /* XXX: inheritance codes */
94: typedef off_t voff_t; /* XXX: offset within a uvm_object */
95:
96: union vm_map_object;
97: typedef union vm_map_object vm_map_object_t;
98:
99: struct vm_map_entry;
100: typedef struct vm_map_entry *vm_map_entry_t;
101:
102: struct vm_map;
103: typedef struct vm_map *vm_map_t;
104:
105: struct vm_page;
106: typedef struct vm_page *vm_page_t;
107:
108: /*
1.1 mrg 109: * defines
110: */
111:
112: /*
113: * the following defines are for uvm_map and functions which call it.
114: */
115:
116: /* protections bits */
117: #define UVM_PROT_MASK 0x07 /* protection mask */
118: #define UVM_PROT_NONE 0x00 /* protection none */
119: #define UVM_PROT_ALL 0x07 /* everything */
120: #define UVM_PROT_READ 0x01 /* read */
121: #define UVM_PROT_WRITE 0x02 /* write */
122: #define UVM_PROT_EXEC 0x04 /* exec */
123:
124: /* protection short codes */
125: #define UVM_PROT_R 0x01 /* read */
126: #define UVM_PROT_W 0x02 /* write */
127: #define UVM_PROT_RW 0x03 /* read-write */
128: #define UVM_PROT_X 0x04 /* exec */
129: #define UVM_PROT_RX 0x05 /* read-exec */
130: #define UVM_PROT_WX 0x06 /* write-exec */
131: #define UVM_PROT_RWX 0x07 /* read-write-exec */
132:
133: /* 0x08: not used */
134:
135: /* inherit codes */
136: #define UVM_INH_MASK 0x30 /* inherit mask */
137: #define UVM_INH_SHARE 0x00 /* "share" */
138: #define UVM_INH_COPY 0x10 /* "copy" */
139: #define UVM_INH_NONE 0x20 /* "none" */
140: #define UVM_INH_DONATE 0x30 /* "donate" << not used */
141:
142: /* 0x40, 0x80: not used */
143:
144: /* bits 0x700: max protection, 0x800: not used */
145:
146: /* bits 0x7000: advice, 0x8000: not used */
147: /* advice: matches MADV_* from sys/mman.h */
148: #define UVM_ADV_NORMAL 0x0 /* 'normal' */
149: #define UVM_ADV_RANDOM 0x1 /* 'random' */
150: #define UVM_ADV_SEQUENTIAL 0x2 /* 'sequential' */
151: /* 0x3: will need, 0x4: dontneed */
152: #define UVM_ADV_MASK 0x7 /* mask */
153:
154: /* mapping flags */
155: #define UVM_FLAG_FIXED 0x010000 /* find space */
156: #define UVM_FLAG_OVERLAY 0x020000 /* establish overlay */
157: #define UVM_FLAG_NOMERGE 0x040000 /* don't merge map entries */
158: #define UVM_FLAG_COPYONW 0x080000 /* set copy_on_write flag */
159: #define UVM_FLAG_AMAPPAD 0x100000 /* for bss: pad amap to reduce malloc() */
160: #define UVM_FLAG_TRYLOCK 0x200000 /* fail if we can not lock map */
161:
162: /* macros to extract info */
163: #define UVM_PROTECTION(X) ((X) & UVM_PROT_MASK)
164: #define UVM_INHERIT(X) (((X) & UVM_INH_MASK) >> 4)
165: #define UVM_MAXPROTECTION(X) (((X) >> 8) & UVM_PROT_MASK)
166: #define UVM_ADVICE(X) (((X) >> 12) & UVM_ADV_MASK)
167:
168: #define UVM_MAPFLAG(PROT,MAXPROT,INH,ADVICE,FLAGS) \
169: ((MAXPROT << 8)|(PROT)|(INH)|((ADVICE) << 12)|(FLAGS))
170:
171: /* magic offset value */
1.38 kleink 172: #define UVM_UNKNOWN_OFFSET ((voff_t) -1)
1.1 mrg 173: /* offset not known(obj) or don't care(!obj) */
174:
175: /*
176: * the following defines are for uvm_km_kmemalloc's flags
177: */
178: #define UVM_KMF_NOWAIT 0x1 /* matches M_NOWAIT */
179: #define UVM_KMF_VALLOC 0x2 /* allocate VA only */
180: #define UVM_KMF_TRYLOCK UVM_FLAG_TRYLOCK /* try locking only */
181:
182: /*
1.15 thorpej 183: * the following defines the strategies for uvm_pagealloc_strat()
184: */
185: #define UVM_PGA_STRAT_NORMAL 0 /* high -> low free list walk */
186: #define UVM_PGA_STRAT_ONLY 1 /* only specified free list */
187: #define UVM_PGA_STRAT_FALLBACK 2 /* ONLY falls back on NORMAL */
188:
189: /*
1.24 chs 190: * flags for uvm_pagealloc_strat()
191: */
1.39 thorpej 192: #define UVM_PGA_USERESERVE 0x0001 /* ok to use reserve pages */
193: #define UVM_PGA_ZERO 0x0002 /* returned page must be zero'd */
1.24 chs 194:
195: /*
1.33 thorpej 196: * lockflags that control the locking behavior of various functions.
197: */
198: #define UVM_LK_ENTER 0x00000001 /* map locked on entry */
199: #define UVM_LK_EXIT 0x00000002 /* leave map locked on exit */
200:
201: /*
1.1 mrg 202: * structures
203: */
204:
205: struct core;
206: struct mount;
207: struct pglist;
208: struct proc;
209: struct ucred;
210: struct uio;
211: struct uvm_object;
212: struct vm_anon;
213: struct vmspace;
1.10 thorpej 214: struct pmap;
1.1 mrg 215: struct vnode;
1.34 thorpej 216: struct simplelock;
1.1 mrg 217:
218: /*
219: * uvmexp: global data structures that are exported to parts of the kernel
220: * other than the vm system.
221: */
222:
223: struct uvmexp {
1.9 mrg 224: /* vm_page constants */
1.1 mrg 225: int pagesize; /* size of a page (PAGE_SIZE): must be power of 2 */
226: int pagemask; /* page mask */
227: int pageshift; /* page shift */
228:
1.9 mrg 229: /* vm_page counters */
1.1 mrg 230: int npages; /* number of pages we manage */
231: int free; /* number of free pages */
232: int active; /* number of active pages */
233: int inactive; /* number of pages that we free'd but may want back */
1.3 chs 234: int paging; /* number of pages in the process of being paged out */
1.1 mrg 235: int wired; /* number of wired pages */
1.40 thorpej 236: int zeropages; /* number of zero'd pages */
1.3 chs 237: int reserve_pagedaemon; /* number of pages reserved for pagedaemon */
238: int reserve_kernel; /* number of pages reserved for kernel */
1.1 mrg 239:
1.9 mrg 240: /* pageout params */
241: int freemin; /* min number of free pages */
242: int freetarg; /* target number of free pages */
243: int inactarg; /* target number of inactive pages */
244: int wiredmax; /* max number of wired pages */
1.1 mrg 245:
1.9 mrg 246: /* swap */
1.1 mrg 247: int nswapdev; /* number of configured swap devices in system */
248: int swpages; /* number of PAGE_SIZE'ed swap pages */
1.32 thorpej 249: int swpguniq; /* number of swap pages in use, not also in RAM */
1.3 chs 250: int swpginuse; /* number of swap pages in use */
1.23 chs 251: int swpgonly; /* number of swap pages in use, not also in RAM */
1.1 mrg 252: int nswget; /* number of times fault calls uvm_swap_get() */
253: int nanon; /* number total of anon's in system */
1.32 thorpej 254: int nanonneeded;/* number of anons currently needed */
1.1 mrg 255: int nfreeanon; /* number of free anon's */
256:
1.9 mrg 257: /* stat counters */
1.7 mrg 258: int faults; /* page fault count */
259: int traps; /* trap count */
260: int intrs; /* interrupt count */
261: int swtch; /* context switch count */
262: int softs; /* software interrupt count */
263: int syscalls; /* system calls */
264: int pageins; /* pagein operation count */
265: /* pageouts are in pdpageouts below */
266: int swapins; /* swapins */
267: int swapouts; /* swapouts */
268: int pgswapin; /* pages swapped in */
269: int pgswapout; /* pages swapped out */
270: int forks; /* forks */
1.1 mrg 271: int forks_ppwait; /* forks where parent waits */
272: int forks_sharevm; /* forks where vmspace is shared */
1.40 thorpej 273: int pga_zerohit; /* pagealloc where zero wanted and zero
274: was available */
275: int pga_zeromiss; /* pagealloc where zero wanted and zero
276: not available */
1.1 mrg 277:
1.9 mrg 278: /* fault subcounters */
1.1 mrg 279: int fltnoram; /* number of times fault was out of ram */
280: int fltnoanon; /* number of times fault was out of anons */
281: int fltpgwait; /* number of times fault had to wait on a page */
282: int fltpgrele; /* number of times fault found a released page */
283: int fltrelck; /* number of times fault relock called */
284: int fltrelckok; /* number of times fault relock is a success */
285: int fltanget; /* number of times fault gets anon page */
286: int fltanretry; /* number of times fault retrys an anon get */
287: int fltamcopy; /* number of times fault clears "needs copy" */
288: int fltnamap; /* number of times fault maps a neighbor anon page */
289: int fltnomap; /* number of times fault maps a neighbor obj page */
290: int fltlget; /* number of times fault does a locked pgo_get */
291: int fltget; /* number of times fault does an unlocked get */
292: int flt_anon; /* number of times fault anon (case 1a) */
293: int flt_acow; /* number of times fault anon cow (case 1b) */
294: int flt_obj; /* number of times fault is on object page (2a) */
295: int flt_prcopy; /* number of times fault promotes with copy (2b) */
296: int flt_przero; /* number of times fault promotes with zerofill (2b) */
297:
1.9 mrg 298: /* daemon counters */
1.1 mrg 299: int pdwoke; /* number of times daemon woke up */
300: int pdrevs; /* number of times daemon rev'd clock hand */
301: int pdswout; /* number of times daemon called for swapout */
302: int pdfreed; /* number of pages daemon freed since boot */
303: int pdscans; /* number of pages daemon scaned since boot */
304: int pdanscan; /* number of anonymous pages scanned by daemon */
305: int pdobscan; /* number of object pages scanned by daemon */
306: int pdreact; /* number of pages daemon reactivated since boot */
307: int pdbusy; /* number of times daemon found a busy page */
308: int pdpageouts; /* number of times daemon started a pageout */
309: int pdpending; /* number of times daemon got a pending pagout */
310: int pddeact; /* number of pages daemon deactivates */
311:
1.9 mrg 312: /* kernel memory objects: managed by uvm_km_kmemalloc() only! */
1.1 mrg 313: struct uvm_object *kmem_object;
314: struct uvm_object *mb_object;
315: };
316:
1.31 thorpej 317: #ifdef _KERNEL
1.45 mrg 318: extern struct uvmexp uvmexp;
319: #endif
1.1 mrg 320:
1.45 mrg 321: /*
322: * Finally, bring in standard UVM headers.
323: */
324: #include <sys/vmmeter.h>
325: #include <sys/queue.h>
326: #include <uvm/uvm_param.h>
327: #include <sys/lock.h>
328: #include <uvm/uvm_prot.h>
329: #include <uvm/uvm_page.h>
330: #include <uvm/uvm_pmap.h>
331: #include <uvm/uvm_map.h>
332: #include <uvm/uvm_fault.h>
333: #include <uvm/uvm_pager.h>
334:
335: /*
336: * Shareable process virtual address space.
337: * May eventually be merged with vm_map.
338: * Several fields are temporary (text, data stuff).
339: */
340: struct vmspace {
341: struct vm_map vm_map; /* VM address map */
342: int vm_refcnt; /* number of references */
343: caddr_t vm_shm; /* SYS5 shared memory private data XXX */
344: /* we copy from vm_startcopy to the end of the structure on fork */
345: #define vm_startcopy vm_rssize
346: segsz_t vm_rssize; /* current resident set size in pages */
347: segsz_t vm_swrss; /* resident set size before last swap */
348: segsz_t vm_tsize; /* text size (pages) XXX */
349: segsz_t vm_dsize; /* data size (pages) XXX */
350: segsz_t vm_ssize; /* stack size (pages) */
351: caddr_t vm_taddr; /* user virtual address of text XXX */
352: caddr_t vm_daddr; /* user virtual address of data XXX */
353: caddr_t vm_maxsaddr; /* user VA at max stack growth */
354: };
355:
356: #ifdef _KERNEL
1.43 mrg 357:
358: /*
359: * the various kernel maps, owned by MD code
360: */
361: extern vm_map_t exec_map;
362: extern vm_map_t kernel_map;
363: extern vm_map_t kmem_map;
364: extern vm_map_t mb_map;
365: extern vm_map_t phys_map;
1.1 mrg 366:
367: /*
368: * macros
369: */
370:
371: /* zalloc zeros memory, alloc does not */
372: #define uvm_km_zalloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,TRUE)
373: #define uvm_km_alloc(MAP,SIZE) uvm_km_alloc1(MAP,SIZE,FALSE)
374:
1.31 thorpej 375: #endif /* _KERNEL */
376:
1.45 mrg 377: #ifdef pmap_resident_count
378: #define vm_resident_count(vm) (pmap_resident_count((vm)->vm_map.pmap))
379: #else
380: #define vm_resident_count(vm) ((vm)->vm_rssize)
381: #endif
1.1 mrg 382:
1.44 mrg 383: /* XXX clean up later */
384: struct buf;
385: struct loadavg;
386: struct proc;
387: struct pmap;
388: struct vmspace;
389: struct vmtotal;
390: struct mount;
391: struct vnode;
392: struct core;
393:
1.31 thorpej 394: #ifdef _KERNEL
1.44 mrg 395:
396: /* vm_machdep.c */
397: void vmapbuf __P((struct buf *, vsize_t));
398: void vunmapbuf __P((struct buf *, vsize_t));
399: void pagemove __P((caddr_t, caddr_t, size_t));
400: #ifndef cpu_swapin
401: void cpu_swapin __P((struct proc *));
402: #endif
403: #ifndef cpu_swapout
404: void cpu_swapout __P((struct proc *));
405: #endif
1.31 thorpej 406:
1.1 mrg 407: /* uvm_aobj.c */
1.19 eeh 408: struct uvm_object *uao_create __P((vsize_t, int));
1.1 mrg 409: void uao_detach __P((struct uvm_object *));
1.36 chs 410: void uao_detach_locked __P((struct uvm_object *));
1.1 mrg 411: void uao_reference __P((struct uvm_object *));
1.36 chs 412: void uao_reference_locked __P((struct uvm_object *));
1.1 mrg 413:
414: /* uvm_fault.c */
1.19 eeh 415: int uvm_fault __P((vm_map_t, vaddr_t,
1.9 mrg 416: vm_fault_t, vm_prot_t));
1.1 mrg 417: /* handle a page fault */
418:
419: /* uvm_glue.c */
420: #if defined(KGDB)
1.13 kleink 421: void uvm_chgkprot __P((caddr_t, size_t, int));
1.1 mrg 422: #endif
1.25 thorpej 423: void uvm_fork __P((struct proc *, struct proc *, boolean_t,
1.41 thorpej 424: void *, size_t, void (*)(void *), void *));
1.21 thorpej 425: void uvm_exit __P((struct proc *));
1.1 mrg 426: void uvm_init_limits __P((struct proc *));
1.13 kleink 427: boolean_t uvm_kernacc __P((caddr_t, size_t, int));
1.11 mycroft 428: __dead void uvm_scheduler __P((void)) __attribute__((noreturn));
1.1 mrg 429: void uvm_swapin __P((struct proc *));
1.13 kleink 430: boolean_t uvm_useracc __P((caddr_t, size_t, int));
1.29 thorpej 431: int uvm_vslock __P((struct proc *, caddr_t, size_t,
1.26 thorpej 432: vm_prot_t));
1.13 kleink 433: void uvm_vsunlock __P((struct proc *, caddr_t, size_t));
1.1 mrg 434:
435:
436: /* uvm_init.c */
437: void uvm_init __P((void));
438: /* init the uvm system */
439:
440: /* uvm_io.c */
441: int uvm_io __P((vm_map_t, struct uio *));
442:
443: /* uvm_km.c */
1.19 eeh 444: vaddr_t uvm_km_alloc1 __P((vm_map_t, vsize_t, boolean_t));
445: void uvm_km_free __P((vm_map_t, vaddr_t, vsize_t));
446: void uvm_km_free_wakeup __P((vm_map_t, vaddr_t,
447: vsize_t));
448: vaddr_t uvm_km_kmemalloc __P((vm_map_t, struct uvm_object *,
449: vsize_t, int));
450: struct vm_map *uvm_km_suballoc __P((vm_map_t, vaddr_t *,
1.27 thorpej 451: vaddr_t *, vsize_t, int,
1.6 thorpej 452: boolean_t, vm_map_t));
1.19 eeh 453: vaddr_t uvm_km_valloc __P((vm_map_t, vsize_t));
454: vaddr_t uvm_km_valloc_wait __P((vm_map_t, vsize_t));
1.46 jeffs 455: vaddr_t uvm_km_valloc_prefer_wait __P((vm_map_t, vsize_t,
456: voff_t));
1.19 eeh 457: vaddr_t uvm_km_alloc_poolpage1 __P((vm_map_t,
1.20 thorpej 458: struct uvm_object *, boolean_t));
1.19 eeh 459: void uvm_km_free_poolpage1 __P((vm_map_t, vaddr_t));
1.1 mrg 460:
1.20 thorpej 461: #define uvm_km_alloc_poolpage(waitok) uvm_km_alloc_poolpage1(kmem_map, \
462: uvmexp.kmem_object, (waitok))
1.17 thorpej 463: #define uvm_km_free_poolpage(addr) uvm_km_free_poolpage1(kmem_map, (addr))
1.1 mrg 464:
465: /* uvm_map.c */
1.19 eeh 466: int uvm_map __P((vm_map_t, vaddr_t *, vsize_t,
1.38 kleink 467: struct uvm_object *, voff_t, uvm_flag_t));
1.19 eeh 468: int uvm_map_pageable __P((vm_map_t, vaddr_t,
1.33 thorpej 469: vaddr_t, boolean_t, int));
1.28 thorpej 470: int uvm_map_pageable_all __P((vm_map_t, int, vsize_t));
1.19 eeh 471: boolean_t uvm_map_checkprot __P((vm_map_t, vaddr_t,
472: vaddr_t, vm_prot_t));
473: int uvm_map_protect __P((vm_map_t, vaddr_t,
474: vaddr_t, vm_prot_t, boolean_t));
475: struct vmspace *uvmspace_alloc __P((vaddr_t, vaddr_t,
1.10 thorpej 476: boolean_t));
477: void uvmspace_init __P((struct vmspace *, struct pmap *,
1.19 eeh 478: vaddr_t, vaddr_t, boolean_t));
1.1 mrg 479: void uvmspace_exec __P((struct proc *));
480: struct vmspace *uvmspace_fork __P((struct vmspace *));
481: void uvmspace_free __P((struct vmspace *));
482: void uvmspace_share __P((struct proc *, struct proc *));
483: void uvmspace_unshare __P((struct proc *));
484:
485:
486: /* uvm_meter.c */
487: void uvm_meter __P((void));
488: int uvm_sysctl __P((int *, u_int, void *, size_t *,
489: void *, size_t, struct proc *));
490:
491: /* uvm_mmap.c */
1.19 eeh 492: int uvm_mmap __P((vm_map_t, vaddr_t *, vsize_t,
1.1 mrg 493: vm_prot_t, vm_prot_t, int,
1.38 kleink 494: caddr_t, voff_t, vsize_t));
1.1 mrg 495:
496: /* uvm_page.c */
1.15 thorpej 497: struct vm_page *uvm_pagealloc_strat __P((struct uvm_object *,
1.38 kleink 498: voff_t, struct vm_anon *, int, int, int));
1.24 chs 499: #define uvm_pagealloc(obj, off, anon, flags) \
500: uvm_pagealloc_strat((obj), (off), (anon), (flags), \
501: UVM_PGA_STRAT_NORMAL, 0)
1.1 mrg 502: void uvm_pagerealloc __P((struct vm_page *,
1.38 kleink 503: struct uvm_object *, voff_t));
1.19 eeh 504: /* Actually, uvm_page_physload takes PF#s which need their own type */
1.35 eeh 505: void uvm_page_physload __P((paddr_t, paddr_t,
506: paddr_t, paddr_t, int));
1.1 mrg 507: void uvm_setpagesize __P((void));
508:
509: /* uvm_pdaemon.c */
1.48 ! thorpej 510: void uvm_pageout __P((void *));
1.1 mrg 511:
512: /* uvm_pglist.c */
1.19 eeh 513: int uvm_pglistalloc __P((psize_t, paddr_t,
514: paddr_t, paddr_t, paddr_t,
1.1 mrg 515: struct pglist *, int, int));
516: void uvm_pglistfree __P((struct pglist *));
517:
518: /* uvm_swap.c */
519: void uvm_swap_init __P((void));
520:
521: /* uvm_unix.c */
522: int uvm_coredump __P((struct proc *, struct vnode *,
523: struct ucred *, struct core *));
1.19 eeh 524: int uvm_grow __P((struct proc *, vaddr_t));
1.35 eeh 525: /* should only be needed if COMPAT_NETBSD32 is defined */
526: struct core32;
527: int uvm_coredump32 __P((struct proc *, struct vnode *,
528: struct ucred *, struct core32 *));
1.1 mrg 529:
530: /* uvm_user.c */
1.19 eeh 531: int uvm_deallocate __P((vm_map_t, vaddr_t, vsize_t));
1.1 mrg 532:
533: /* uvm_vnode.c */
1.38 kleink 534: void uvm_vnp_setsize __P((struct vnode *, voff_t));
1.1 mrg 535: void uvm_vnp_sync __P((struct mount *));
536: void uvm_vnp_terminate __P((struct vnode *));
537: /* terminate a uvm/uvn object */
538: boolean_t uvm_vnp_uncache __P((struct vnode *));
539: struct uvm_object *uvn_attach __P((void *, vm_prot_t));
1.37 thorpej 540:
541: /* kern_malloc.c */
542: void kmeminit_nkmempages __P((void));
543: void kmeminit __P((void));
544: extern int nkmempages;
1.1 mrg 545:
1.31 thorpej 546: #endif /* _KERNEL */
547:
1.8 perry 548: #endif /* _UVM_UVM_EXTERN_H_ */
CVSweb <webmaster@jp.NetBSD.org>