vm_extern.h revision 112569
1191668Sjamie/*- 2191668Sjamie * Copyright (c) 1992, 1993 3234712Sjamie * The Regents of the University of California. All rights reserved. 4191668Sjamie * 5191668Sjamie * Redistribution and use in source and binary forms, with or without 6191668Sjamie * modification, are permitted provided that the following conditions 7191668Sjamie * are met: 8191668Sjamie * 1. Redistributions of source code must retain the above copyright 9191668Sjamie * notice, this list of conditions and the following disclaimer. 10191668Sjamie * 2. Redistributions in binary form must reproduce the above copyright 11191668Sjamie * notice, this list of conditions and the following disclaimer in the 12191668Sjamie * documentation and/or other materials provided with the distribution. 13191668Sjamie * 3. All advertising materials mentioning features or use of this software 14191668Sjamie * must display the following acknowledgement: 15191668Sjamie * This product includes software developed by the University of 16191668Sjamie * California, Berkeley and its contributors. 17191668Sjamie * 4. Neither the name of the University nor the names of its contributors 18191668Sjamie * may be used to endorse or promote products derived from this software 19191668Sjamie * without specific prior written permission. 20191668Sjamie * 21191668Sjamie * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22191668Sjamie * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23191668Sjamie * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24191668Sjamie * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25191668Sjamie * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2646432Sphk * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2746432Sphk * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28117280Scharnier * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29117280Scharnier * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30117280Scharnier * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31234712Sjamie * SUCH DAMAGE. 32234712Sjamie * 33185435Sbz * @(#)vm_extern.h 8.2 (Berkeley) 1/12/94 34158428Smatteo * $FreeBSD: head/sys/vm/vm_extern.h 112569 2003-03-25 00:07:06Z jake $ 3578723Sdd */ 36192896Sjamie 3746155Sphk#ifndef _VM_EXTERN_H_ 3846155Sphk#define _VM_EXTERN_H_ 3978723Sdd 40129848Smaximstruct buf; 41234712Sjamiestruct proc; 4278723Sddstruct vmspace; 4378723Sddstruct vmtotal; 4478723Sddstruct mount; 4578723Sddstruct vnode; 4678723Sdd 47234712Sjamie#ifdef _KERNEL 48192896Sjamie 49234712Sjamie#ifdef TYPEDEF_FOR_UAP 50185435Sbzint getpagesize(struct thread *, void *, int *); 51234712Sjamieint madvise(struct thread *, void *, int *); 52234712Sjamieint mincore(struct thread *, void *, int *); 53234712Sjamieint mprotect(struct thread *, void *, int *); 54234712Sjamieint msync(struct thread *, void *, int *); 55234712Sjamieint munmap(struct thread *, void *, int *); 56234712Sjamieint obreak(struct thread *, void *, int *); 57234712Sjamieint sbrk(struct thread *, void *, int *); 58236198Sjamieint sstk(struct thread *, void *, int *); 59234712Sjamieint swapon(struct thread *, void *, int *); 60234712Sjamie#endif /* TYPEDEF_FOR_UAP */ 61234712Sjamie 62234712Sjamieint kernacc(void *, int, int); 63234712Sjamievm_offset_t kmem_alloc(vm_map_t, vm_size_t); 64234712Sjamievm_offset_t kmem_alloc_nofault(vm_map_t, vm_size_t); 65234712Sjamievm_offset_t kmem_alloc_pageable(vm_map_t, vm_size_t); 66234712Sjamievm_offset_t kmem_alloc_wait(vm_map_t, vm_size_t); 67234712Sjamievoid kmem_free(vm_map_t, vm_offset_t, vm_size_t); 68234712Sjamievoid kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); 69234712Sjamievoid kmem_init(vm_offset_t, vm_offset_t); 70234712Sjamievm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t); 71234712Sjamievm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t); 72192896Sjamievoid munmapfd(struct thread *, int); 73192896Sjamieint swaponvp(struct thread *, struct vnode *, dev_t , u_long); 74185435Sbzvoid swapout_procs(int); 75234712Sjamieint useracc(void *, int, int); 76234712Sjamieint vm_fault(vm_map_t, vm_offset_t, vm_prot_t, int); 77234712Sjamievoid vm_fault_copy_entry(vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t); 78234712Sjamievoid vm_fault_unwire(vm_map_t, vm_offset_t, vm_offset_t); 79234712Sjamieint vm_fault_wire(vm_map_t, vm_offset_t, vm_offset_t, boolean_t); 80234712Sjamievoid vm_forkproc(struct thread *, struct proc *, struct thread *, int); 81234712Sjamievoid vm_waitproc(struct proc *); 82193929Sjamieint vm_mmap(vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, void *, vm_ooffset_t); 83193929Sjamievm_offset_t vm_page_alloc_contig(vm_offset_t, vm_paddr_t, vm_paddr_t, vm_offset_t); 84234712Sjamievoid vm_set_page_size(void); 85234988Sjamiestruct vmspace *vmspace_alloc(vm_offset_t, vm_offset_t); 86234712Sjamiestruct vmspace *vmspace_fork(struct vmspace *); 87234712Sjamievoid vmspace_exec(struct proc *, vm_offset_t, vm_offset_t); 88234712Sjamievoid vmspace_unshare(struct proc *); 89234712Sjamievoid vmspace_free(struct vmspace *); 90234712Sjamievoid vmspace_exitfree(struct proc *); 91234712Sjamievoid vnode_pager_setsize(struct vnode *, vm_ooffset_t); 92234712Sjamievoid vslock(void *, u_int); 93234712Sjamievoid vsunlock(void *, u_int); 94234712Sjamievoid vm_object_print(/* db_expr_t */ long, boolean_t, /* db_expr_t */ long, 95256387Shrs char *); 96278484Sjamieint vm_fault_quick(caddr_t v, int prot); 97234712Sjamievoid vm_proc_new(struct proc *p); 98234712Sjamievoid vm_proc_dispose(struct proc *p); 99234712Sjamie#endif /* _KERNEL */ 100234712Sjamie#endif /* !_VM_EXTERN_H_ */ 101234712Sjamie