vm_extern.h revision 194376
186796Sache/*- 22785Ssos * Copyright (c) 1992, 1993 386796Sache * The Regents of the University of California. All rights reserved. 486796Sache * 586796Sache * Redistribution and use in source and binary forms, with or without 686796Sache * modification, are permitted provided that the following conditions 786796Sache * are met: 886796Sache * 1. Redistributions of source code must retain the above copyright 986796Sache * notice, this list of conditions and the following disclaimer. 1086796Sache * 2. Redistributions in binary form must reproduce the above copyright 1186796Sache * notice, this list of conditions and the following disclaimer in the 1286796Sache * documentation and/or other materials provided with the distribution. 132785Ssos * 4. Neither the name of the University nor the names of its contributors 142785Ssos * may be used to endorse or promote products derived from this software 152785Ssos * without specific prior written permission. 162785Ssos * 172785Ssos * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 182785Ssos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 192785Ssos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 202785Ssos * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 212785Ssos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 222785Ssos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 232785Ssos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 242785Ssos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 252785Ssos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 262785Ssos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 272785Ssos * SUCH DAMAGE. 282785Ssos * 292785Ssos * @(#)vm_extern.h 8.2 (Berkeley) 1/12/94 302785Ssos * $FreeBSD: head/sys/vm/vm_extern.h 194376 2009-06-17 17:19:48Z alc $ 312785Ssos */ 322785Ssos 332785Ssos#ifndef _VM_EXTERN_H_ 342785Ssos#define _VM_EXTERN_H_ 352785Ssos 362785Ssosstruct buf; 372785Ssosstruct proc; 382785Ssosstruct vmspace; 392785Ssosstruct vmtotal; 402785Ssosstruct mount; 412785Ssosstruct vnode; 4286796Sache 4386796Sache#ifdef _KERNEL 4486796Sache 4586796Sacheint kernacc(void *, int, int); 4686796Sachevm_offset_t kmem_alloc(vm_map_t, vm_size_t); 4786796Sachevm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, 4886796Sache vm_paddr_t low, vm_paddr_t high, unsigned long alignment, 4986796Sache unsigned long boundary); 5086796Sachevm_offset_t kmem_alloc_nofault(vm_map_t, vm_size_t); 5186796Sachevm_offset_t kmem_alloc_wait(vm_map_t, vm_size_t); 5286796Sachevoid kmem_free(vm_map_t, vm_offset_t, vm_size_t); 532785Ssosvoid kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); 542785Ssosvoid kmem_init(vm_offset_t, vm_offset_t); 552785Ssosvm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t); 562785Ssosvm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, 572785Ssos boolean_t); 582785Ssosvoid swapout_procs(int); 592785Ssosint useracc(void *, int, int); 602785Ssosint vm_fault(vm_map_t, vm_offset_t, vm_prot_t, int); 612785Ssosvoid vm_fault_copy_entry(vm_map_t, vm_map_t, vm_map_entry_t, vm_map_entry_t); 622785Ssosvoid vm_fault_unwire(vm_map_t, vm_offset_t, vm_offset_t, boolean_t); 632785Ssosint vm_fault_wire(vm_map_t, vm_offset_t, vm_offset_t, boolean_t, boolean_t); 642785Ssosint vm_forkproc(struct thread *, struct proc *, struct thread *, struct vmspace *, int); 652785Ssosvoid vm_waitproc(struct proc *); 662785Ssosint vm_mmap(vm_map_t, vm_offset_t *, vm_size_t, vm_prot_t, vm_prot_t, int, objtype_t, void *, vm_ooffset_t); 672785Ssosvoid vm_set_page_size(void); 682785Ssosstruct vmspace *vmspace_alloc(vm_offset_t, vm_offset_t); 692785Ssosstruct vmspace *vmspace_fork(struct vmspace *); 702785Ssosint vmspace_exec(struct proc *, vm_offset_t, vm_offset_t); 712785Ssosint vmspace_unshare(struct proc *); 722785Ssosvoid vmspace_exit(struct thread *); 732785Ssosstruct vmspace *vmspace_acquire_ref(struct proc *); 742785Ssosvoid vmspace_free(struct vmspace *); 752785Ssosvoid vmspace_exitfree(struct proc *); 762785Ssosvoid vnode_pager_setsize(struct vnode *, vm_ooffset_t); 772785Ssosint vslock(void *, size_t); 782785Ssosvoid vsunlock(void *, size_t); 792785Ssosvoid vm_object_print(/* db_expr_t */ long, boolean_t, /* db_expr_t */ long, 802785Ssos char *); 812785Ssosint vm_fault_quick(caddr_t v, int prot); 822785Ssosstruct sf_buf *vm_imgact_map_page(vm_object_t object, vm_ooffset_t offset); 832785Ssosvoid vm_imgact_unmap_page(struct sf_buf *sf); 842785Ssosvoid vm_thread_dispose(struct thread *td); 85void vm_thread_dispose_altkstack(struct thread *td); 86int vm_thread_new(struct thread *td, int pages); 87int vm_thread_new_altkstack(struct thread *td, int pages); 88void vm_thread_swapin(struct thread *td); 89void vm_thread_swapout(struct thread *td); 90#endif /* _KERNEL */ 91#endif /* !_VM_EXTERN_H_ */ 92