vm_extern.h revision 92029
190271Salfred/*-
226219Swpaul * Copyright (c) 1992, 1993
326219Swpaul *	The Regents of the University of California.  All rights reserved.
426219Swpaul *
526219Swpaul * Redistribution and use in source and binary forms, with or without
626219Swpaul * modification, are permitted provided that the following conditions
726219Swpaul * are met:
826219Swpaul * 1. Redistributions of source code must retain the above copyright
926219Swpaul *    notice, this list of conditions and the following disclaimer.
1026219Swpaul * 2. Redistributions in binary form must reproduce the above copyright
1126219Swpaul *    notice, this list of conditions and the following disclaimer in the
1226219Swpaul *    documentation and/or other materials provided with the distribution.
1326219Swpaul * 3. All advertising materials mentioning features or use of this software
1426219Swpaul *    must display the following acknowledgement:
1526219Swpaul *	This product includes software developed by the University of
1626219Swpaul *	California, Berkeley and its contributors.
1726219Swpaul * 4. Neither the name of the University nor the names of its contributors
1826219Swpaul *    may be used to endorse or promote products derived from this software
1926219Swpaul *    without specific prior written permission.
2026219Swpaul *
2126219Swpaul * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2226219Swpaul * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2326219Swpaul * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2426219Swpaul * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2526219Swpaul * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2626219Swpaul * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2726219Swpaul * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2826219Swpaul * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2992990Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3092990Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3192990Sobrien * SUCH DAMAGE.
3292990Sobrien *
3371579Sdeischen *	@(#)vm_extern.h	8.2 (Berkeley) 1/12/94
3426219Swpaul * $FreeBSD: head/sys/vm/vm_extern.h 92029 2002-03-10 21:52:48Z eivind $
3526219Swpaul */
3626219Swpaul
3726219Swpaul#ifndef _VM_EXTERN_H_
3826219Swpaul#define	_VM_EXTERN_H_
3926219Swpaul
4026219Swpaulstruct buf;
4126219Swpaulstruct proc;
4226219Swpaulstruct vmspace;
4326219Swpaulstruct vmtotal;
4426219Swpaulstruct mount;
4526219Swpaulstruct vnode;
4626219Swpaul
4774462Salfred#ifdef _KERNEL
4826219Swpaul
4926219Swpaul#ifdef TYPEDEF_FOR_UAP
5071579Sdeischenint getpagesize __P((struct thread *, void *, int *));
5126219Swpaulint madvise __P((struct thread *, void *, int *));
52124178Snectarint mincore __P((struct thread *, void *, int *));
53124178Snectarint mprotect __P((struct thread *, void *, int *));
5426219Swpaulint msync __P((struct thread *, void *, int *));
5526219Swpaulint munmap __P((struct thread *, void *, int *));
5626219Swpaulint obreak __P((struct thread *, void *, int *));
5726219Swpaulint sbrk __P((struct thread *, void *, int *));
5826219Swpaulint sstk __P((struct thread *, void *, int *));
5926219Swpaulint swapon __P((struct thread *, void *, int *));
6026219Swpaul#endif			/* TYPEDEF_FOR_UAP */
6126219Swpaul
6226219Swpaulint grow __P((struct proc *, size_t));
6326219Swpaulint grow_stack __P((struct proc *, size_t));
6426219Swpaulint kernacc __P((caddr_t, int, int));
6526219Swpaulvm_offset_t kmem_alloc __P((vm_map_t, vm_size_t));
6626219Swpaulvm_offset_t kmem_alloc_nofault __P((vm_map_t, vm_size_t));
6726219Swpaulvm_offset_t kmem_alloc_pageable __P((vm_map_t, vm_size_t));
6826219Swpaulvm_offset_t kmem_alloc_wait __P((vm_map_t, vm_size_t));
6926219Swpaulvoid kmem_free __P((vm_map_t, vm_offset_t, vm_size_t));
7026219Swpaulvoid kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t));
7126219Swpaulvoid kmem_init __P((vm_offset_t, vm_offset_t));
7226219Swpaulvm_offset_t kmem_malloc __P((vm_map_t, vm_size_t, boolean_t));
7326219Swpaulvm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t));
7426219Swpaulvoid munmapfd __P((struct thread *, int));
7526219Swpaulint swaponvp __P((struct thread *, struct vnode *, dev_t , u_long));
7626219Swpaulvoid swapout_procs __P((int));
7726219Swpaulint useracc __P((caddr_t, int, int));
7826219Swpaulint vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, int));
7926219Swpaulvoid vm_fault_copy_entry __P((vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t));
8026219Swpaulvoid vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t));
8126219Swpaulint vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
8226219Swpaulint vm_fault_user_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
8326219Swpaulvoid vm_forkproc __P((struct thread *, struct proc *, struct thread *, int));
8426219Swpaulvoid vm_waitproc __P((struct proc *));
8526219Swpaulint vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, void *, vm_ooffset_t));
8626219Swpaulvm_offset_t vm_page_alloc_contig __P((vm_offset_t, vm_offset_t, vm_offset_t, vm_offset_t));
8726219Swpaulvoid vm_set_page_size __P((void));
8826219Swpaulstruct vmspace *vmspace_alloc __P((vm_offset_t, vm_offset_t));
8926219Swpaulstruct vmspace *vmspace_fork __P((struct vmspace *));
9026219Swpaulvoid vmspace_exec __P((struct proc *));
9126219Swpaulvoid vmspace_unshare __P((struct proc *));
9226219Swpaulvoid vmspace_free __P((struct vmspace *));
9326219Swpaulvoid vmspace_exitfree __P((struct proc *));
9426219Swpaulvoid vnode_pager_setsize __P((struct vnode *, vm_ooffset_t));
9526219Swpaulvoid vslock __P((caddr_t, u_int));
9626219Swpaulvoid vsunlock __P((caddr_t, u_int));
9726219Swpaulvoid vm_object_print __P((/* db_expr_t */ long, boolean_t, /* db_expr_t */ long,
9826219Swpaul			  char *));
9926219Swpaulint vm_fault_quick __P((caddr_t v, int prot));
10026219Swpaul#endif				/* _KERNEL */
10126219Swpaul#endif				/* !_VM_EXTERN_H_ */
10226219Swpaul