vm_extern.h revision 22521
160786Sps/*-
2170256Sdelphij * Copyright (c) 1992, 1993
360786Sps *	The Regents of the University of California.  All rights reserved.
460786Sps *
560786Sps * Redistribution and use in source and binary forms, with or without
660786Sps * modification, are permitted provided that the following conditions
760786Sps * are met:
860786Sps * 1. Redistributions of source code must retain the above copyright
960786Sps *    notice, this list of conditions and the following disclaimer.
1060786Sps * 2. Redistributions in binary form must reproduce the above copyright
1160786Sps *    notice, this list of conditions and the following disclaimer in the
1260786Sps *    documentation and/or other materials provided with the distribution.
1360786Sps * 3. All advertising materials mentioning features or use of this software
1460786Sps *    must display the following acknowledgement:
1560786Sps *	This product includes software developed by the University of
1660786Sps *	California, Berkeley and its contributors.
1760786Sps * 4. Neither the name of the University nor the names of its contributors
1860786Sps *    may be used to endorse or promote products derived from this software
1960786Sps *    without specific prior written permission.
2060786Sps *
2160786Sps * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2260786Sps * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2360786Sps * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2460786Sps * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2560786Sps * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2660786Sps * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2760786Sps * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2860786Sps * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2960786Sps * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3060786Sps * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3160786Sps * SUCH DAMAGE.
3260786Sps *
3360786Sps *	@(#)vm_extern.h	8.2 (Berkeley) 1/12/94
3460786Sps * $FreeBSD: head/sys/vm/vm_extern.h 22521 1997-02-10 02:22:35Z dyson $
3560786Sps */
3689019Sps
3789019Sps#ifndef _VM_EXTERN_H_
3889019Sps#define	_VM_EXTERN_H_
3960786Sps
4060786Spsstruct buf;
4160786Spsstruct proc;
4260786Spsstruct vmspace;
4360786Spsstruct vmtotal;
4460786Spsstruct mount;
4560786Spsstruct vnode;
4660786Sps
4760786Sps#ifdef KERNEL
4860786Sps
4960786Sps#ifdef TYPEDEF_FOR_UAP
5060786Spsint getpagesize __P((struct proc * p, void *, int *));
5160786Spsint madvise __P((struct proc *, void *, int *));
5260786Spsint mincore __P((struct proc *, void *, int *));
53128345Stjrint mprotect __P((struct proc *, void *, int *));
54170256Sdelphijint msync __P((struct proc *, void *, int *));
5560786Spsint munmap __P((struct proc *, void *, int *));
5660786Spsint obreak __P((struct proc *, void *, int *));
5760786Spsint sbrk __P((struct proc *, void *, int *));
5860786Spsint smmap __P((struct proc *, void *, int *));
5960786Spsint sstk __P((struct proc *, void *, int *));
6060786Spsint swapon __P((struct proc *, void *, int *));
6160786Sps#endif
6260786Sps
6360786Spsvoid faultin __P((struct proc *p));
6460786Spsint grow __P((struct proc *, u_int));
6560786Spsint kernacc __P((caddr_t, int, int));
66128345Stjrvm_offset_t kmem_alloc __P((vm_map_t, vm_size_t));
6760786Spsvm_offset_t kmem_alloc_pageable __P((vm_map_t, vm_size_t));
6860786Spsvm_offset_t kmem_alloc_wait __P((vm_map_t, vm_size_t));
6960786Spsvoid kmem_free __P((vm_map_t, vm_offset_t, vm_size_t));
7060786Spsvoid kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t));
7160786Spsvoid kmem_init __P((vm_offset_t, vm_offset_t));
72128345Stjrvm_offset_t kmem_malloc __P((vm_map_t, vm_size_t, boolean_t));
73128345Stjrvm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t));
74128345Stjrvoid munmapfd __P((struct proc *, int));
75128345Stjrint pager_cache __P((vm_object_t, boolean_t));
76128345Stjrint swaponvp __P((struct proc *, struct vnode *, dev_t , u_long));
77128345Stjrvoid swapout_procs __P((void));
78128345Stjrint useracc __P((caddr_t, int, int));
79128345Stjrint vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t));
80128345Stjrvoid vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));
81128345Stjrvoid vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t));
82128345Stjrint vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
83128345Stjrint vm_fault_user_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
84128345Stjrint vm_fork __P((struct proc *, struct proc *));
85128345Stjrint vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, caddr_t, vm_ooffset_t));
86128345Stjrvm_offset_t vm_page_alloc_contig __P((vm_offset_t, vm_offset_t, vm_offset_t, vm_offset_t));
87128345Stjrvoid vm_set_page_size __P((void));
88128345Stjrvoid vmmeter __P((void));
89128345Stjrstruct vmspace *vmspace_alloc __P((vm_offset_t, vm_offset_t, int));
90128345Stjrstruct vmspace *vmspace_fork __P((struct vmspace *));
91128345Stjrvoid vmspace_free __P((struct vmspace *));
92128345Stjrvoid vnode_pager_setsize __P((struct vnode *, vm_ooffset_t));
93128345Stjrvoid vnode_pager_umount __P((struct mount *));
94128345Stjrvoid vnode_pager_uncache __P((struct vnode *, struct proc *));
95128345Stjrvoid vslock __P((caddr_t, u_int));
96128345Stjrvoid vsunlock __P((caddr_t, u_int, int));
97128345Stjrvoid vm_object_print __P((/* db_expr_t */ int, boolean_t, /* db_expr_t */ int,
9860786Sps			  char *));
9960786Spsvoid vm_fault_quick __P((caddr_t v, int prot));
10060786Sps
10160786Sps#endif				/* KERNEL */
102128345Stjr
103128345Stjr#endif				/* !_VM_EXTERN_H_ */
104128345Stjr