vm_extern.h revision 55206
1234285Sdim/*-
2234285Sdim * Copyright (c) 1992, 1993
3234285Sdim *	The Regents of the University of California.  All rights reserved.
4234285Sdim *
5234285Sdim * Redistribution and use in source and binary forms, with or without
6234285Sdim * modification, are permitted provided that the following conditions
7234285Sdim * are met:
8234285Sdim * 1. Redistributions of source code must retain the above copyright
9234285Sdim *    notice, this list of conditions and the following disclaimer.
10234285Sdim * 2. Redistributions in binary form must reproduce the above copyright
11234285Sdim *    notice, this list of conditions and the following disclaimer in the
12234285Sdim *    documentation and/or other materials provided with the distribution.
13234285Sdim * 3. All advertising materials mentioning features or use of this software
14234285Sdim *    must display the following acknowledgement:
15252723Sdim *	This product includes software developed by the University of
16234285Sdim *	California, Berkeley and its contributors.
17234285Sdim * 4. Neither the name of the University nor the names of its contributors
18234285Sdim *    may be used to endorse or promote products derived from this software
19234285Sdim *    without specific prior written permission.
20234285Sdim *
21252723Sdim * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22234285Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23252723Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24234285Sdim * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25234285Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26252723Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27234285Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28252723Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29263509Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30245431Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31234285Sdim * SUCH DAMAGE.
32234285Sdim *
33234285Sdim *	@(#)vm_extern.h	8.2 (Berkeley) 1/12/94
34234285Sdim * $FreeBSD: head/sys/vm/vm_extern.h 55206 1999-12-29 05:07:58Z peter $
35234285Sdim */
36234285Sdim
37234285Sdim#ifndef _VM_EXTERN_H_
38234285Sdim#define	_VM_EXTERN_H_
39234285Sdim
40245431Sdimstruct buf;
41234285Sdimstruct proc;
42245431Sdimstruct vmspace;
43234285Sdimstruct vmtotal;
44245431Sdimstruct mount;
45234285Sdimstruct vnode;
46245431Sdim
47234285Sdim#ifdef _KERNEL
48245431Sdim
49234285Sdim#ifdef TYPEDEF_FOR_UAP
50245431Sdimint getpagesize __P((struct proc * p, void *, int *));
51234285Sdimint madvise __P((struct proc *, void *, int *));
52245431Sdimint mincore __P((struct proc *, void *, int *));
53234285Sdimint mprotect __P((struct proc *, void *, int *));
54245431Sdimint msync __P((struct proc *, void *, int *));
55234285Sdimint munmap __P((struct proc *, void *, int *));
56245431Sdimint obreak __P((struct proc *, void *, int *));
57234285Sdimint sbrk __P((struct proc *, void *, int *));
58263509Sdimint sstk __P((struct proc *, void *, int *));
59263509Sdimint swapon __P((struct proc *, void *, int *));
60234285Sdim#endif
61234285Sdim
62234285Sdimint grow __P((struct proc *, size_t));
63263509Sdimint grow_stack __P((struct proc *, size_t));
64234285Sdimint kernacc __P((caddr_t, int, int));
65234285Sdimvm_offset_t kmem_alloc __P((vm_map_t, vm_size_t));
66234285Sdimvm_offset_t kmem_alloc_nofault __P((vm_map_t, vm_size_t));
67234285Sdimvm_offset_t kmem_alloc_pageable __P((vm_map_t, vm_size_t));
68234285Sdimvm_offset_t kmem_alloc_wait __P((vm_map_t, vm_size_t));
69234285Sdimvoid kmem_free __P((vm_map_t, vm_offset_t, vm_size_t));
70234285Sdimvoid kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t));
71234285Sdimvoid kmem_init __P((vm_offset_t, vm_offset_t));
72234285Sdimvm_offset_t kmem_malloc __P((vm_map_t, vm_size_t, boolean_t));
73234285Sdimvm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t));
74234285Sdimvoid munmapfd __P((struct proc *, int));
75234285Sdimint swaponvp __P((struct proc *, struct vnode *, dev_t , u_long));
76234285Sdimvoid swapout_procs __P((int));
77245431Sdimint useracc __P((caddr_t, int, int));
78234285Sdimint vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, int));
79234285Sdimvoid vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));
80234285Sdimvoid vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t));
81234285Sdimint vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
82234285Sdimint vm_fault_user_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
83234285Sdimvoid vm_fork __P((struct proc *, struct proc *, int));
84234285Sdimint vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, void *, vm_ooffset_t));
85234285Sdimvm_offset_t vm_page_alloc_contig __P((vm_offset_t, vm_offset_t, vm_offset_t, vm_offset_t));
86234285Sdimvoid vm_set_page_size __P((void));
87234285Sdimvoid vmmeter __P((void));
88234285Sdimstruct vmspace *vmspace_alloc __P((vm_offset_t, vm_offset_t));
89234285Sdimstruct vmspace *vmspace_fork __P((struct vmspace *));
90234285Sdimvoid vmspace_exec __P((struct proc *));
91234285Sdimvoid vmspace_unshare __P((struct proc *));
92234285Sdimvoid vmspace_free __P((struct vmspace *));
93234285Sdimvoid vnode_pager_setsize __P((struct vnode *, vm_ooffset_t));
94234285Sdimvoid vslock __P((caddr_t, u_int));
95234285Sdimvoid vsunlock __P((caddr_t, u_int, int));
96234285Sdimvoid vm_object_print __P((/* db_expr_t */ long, boolean_t, /* db_expr_t */ long,
97234285Sdim			  char *));
98234285Sdimint vm_fault_quick __P((caddr_t v, int prot));
99234285Sdim
100234285Sdim#endif				/* _KERNEL */
101234285Sdim
102245431Sdim#endif				/* !_VM_EXTERN_H_ */
103234285Sdim