vm_extern.h revision 1541
11541Srgrimes/*- 21541Srgrimes * Copyright (c) 1992, 1993 31541Srgrimes * The Regents of the University of California. All rights reserved. 41541Srgrimes * 51541Srgrimes * Redistribution and use in source and binary forms, with or without 61541Srgrimes * modification, are permitted provided that the following conditions 71541Srgrimes * are met: 81541Srgrimes * 1. Redistributions of source code must retain the above copyright 91541Srgrimes * notice, this list of conditions and the following disclaimer. 101541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111541Srgrimes * notice, this list of conditions and the following disclaimer in the 121541Srgrimes * documentation and/or other materials provided with the distribution. 131541Srgrimes * 3. All advertising materials mentioning features or use of this software 141541Srgrimes * must display the following acknowledgement: 151541Srgrimes * This product includes software developed by the University of 161541Srgrimes * California, Berkeley and its contributors. 171541Srgrimes * 4. Neither the name of the University nor the names of its contributors 181541Srgrimes * may be used to endorse or promote products derived from this software 191541Srgrimes * without specific prior written permission. 201541Srgrimes * 211541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311541Srgrimes * SUCH DAMAGE. 321541Srgrimes * 331541Srgrimes * @(#)vm_extern.h 8.2 (Berkeley) 1/12/94 341541Srgrimes */ 351541Srgrimes 361541Srgrimesstruct buf; 371541Srgrimesstruct loadavg; 381541Srgrimesstruct proc; 391541Srgrimesstruct vmspace; 401541Srgrimesstruct vmtotal; 411541Srgrimesstruct mount; 421541Srgrimesstruct vnode; 431541Srgrimes 441541Srgrimes#ifdef KGDB 451541Srgrimesvoid chgkprot __P((caddr_t, int, int)); 461541Srgrimes#endif 471541Srgrimes 481541Srgrimes#ifdef KERNEL 491541Srgrimes#ifdef TYPEDEF_FOR_UAP 501541Srgrimesint getpagesize __P((struct proc *p, void *, int *)); 511541Srgrimesint madvise __P((struct proc *, void *, int *)); 521541Srgrimesint mincore __P((struct proc *, void *, int *)); 531541Srgrimesint mprotect __P((struct proc *, void *, int *)); 541541Srgrimesint msync __P((struct proc *, void *, int *)); 551541Srgrimesint munmap __P((struct proc *, void *, int *)); 561541Srgrimesint obreak __P((struct proc *, void *, int *)); 571541Srgrimesint sbrk __P((struct proc *, void *, int *)); 581541Srgrimesint smmap __P((struct proc *, void *, int *)); 591541Srgrimesint sstk __P((struct proc *, void *, int *)); 601541Srgrimes#endif 611541Srgrimes 621541Srgrimesvoid assert_wait __P((int, boolean_t)); 631541Srgrimesint grow __P((struct proc *, u_int)); 641541Srgrimesvoid iprintf __P((const char *, ...)); 651541Srgrimesint kernacc __P((caddr_t, int, int)); 661541Srgrimesint kinfo_loadavg __P((int, char *, int *, int, int *)); 671541Srgrimesint kinfo_meter __P((int, caddr_t, int *, int, int *)); 681541Srgrimesvm_offset_t kmem_alloc __P((vm_map_t, vm_size_t)); 691541Srgrimesvm_offset_t kmem_alloc_pageable __P((vm_map_t, vm_size_t)); 701541Srgrimesvm_offset_t kmem_alloc_wait __P((vm_map_t, vm_size_t)); 711541Srgrimesvoid kmem_free __P((vm_map_t, vm_offset_t, vm_size_t)); 721541Srgrimesvoid kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t)); 731541Srgrimesvoid kmem_init __P((vm_offset_t, vm_offset_t)); 741541Srgrimesvm_offset_t kmem_malloc __P((vm_map_t, vm_size_t, boolean_t)); 751541Srgrimesvm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, 761541Srgrimes vm_size_t, boolean_t)); 771541Srgrimesvoid loadav __P((struct loadavg *)); 781541Srgrimesvoid munmapfd __P((int)); 791541Srgrimesint pager_cache __P((vm_object_t, boolean_t)); 801541Srgrimesvoid sched __P((void)); 811541Srgrimesint svm_allocate __P((struct proc *, void *, int *)); 821541Srgrimesint svm_deallocate __P((struct proc *, void *, int *)); 831541Srgrimesint svm_inherit __P((struct proc *, void *, int *)); 841541Srgrimesint svm_protect __P((struct proc *, void *, int *)); 851541Srgrimesvoid swapinit __P((void)); 861541Srgrimesint swapon __P((struct proc *, void *, int *)); 871541Srgrimesvoid swapout __P((struct proc *)); 881541Srgrimesvoid swapout_threads __P((void)); 891541Srgrimesint swfree __P((struct proc *, int)); 901541Srgrimesvoid swstrategy __P((struct buf *)); 911541Srgrimesvoid thread_block __P((void)); 921541Srgrimesvoid thread_sleep __P((int, simple_lock_t, boolean_t)); 931541Srgrimesvoid thread_wakeup __P((int)); 941541Srgrimesint useracc __P((caddr_t, int, int)); 951541Srgrimesint vm_allocate __P((vm_map_t, 961541Srgrimes vm_offset_t *, vm_size_t, boolean_t)); 971541Srgrimesint vm_allocate_with_pager __P((vm_map_t, vm_offset_t *, 981541Srgrimes vm_size_t, boolean_t, vm_pager_t, vm_offset_t, boolean_t)); 991541Srgrimesint vm_deallocate __P((vm_map_t, vm_offset_t, vm_size_t)); 1001541Srgrimesint vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t)); 1011541Srgrimesvoid vm_fault_copy_entry __P((vm_map_t, 1021541Srgrimes vm_map_t, vm_map_entry_t, vm_map_entry_t)); 1031541Srgrimesvoid vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t)); 1041541Srgrimesint vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t)); 1051541Srgrimesint vm_fork __P((struct proc *, struct proc *, int)); 1061541Srgrimesint vm_inherit __P((vm_map_t, 1071541Srgrimes vm_offset_t, vm_size_t, vm_inherit_t)); 1081541Srgrimesvoid vm_init_limits __P((struct proc *)); 1091541Srgrimesvoid vm_mem_init __P((void)); 1101541Srgrimesint vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, 1111541Srgrimes vm_prot_t, vm_prot_t, int, caddr_t, vm_offset_t)); 1121541Srgrimesint vm_protect __P((vm_map_t, 1131541Srgrimes vm_offset_t, vm_size_t, boolean_t, vm_prot_t)); 1141541Srgrimesvoid vm_set_page_size __P((void)); 1151541Srgrimesvoid vmmeter __P((void)); 1161541Srgrimesstruct vmspace *vmspace_alloc __P((vm_offset_t, vm_offset_t, int)); 1171541Srgrimesstruct vmspace *vmspace_fork __P((struct vmspace *)); 1181541Srgrimesvoid vmspace_free __P((struct vmspace *)); 1191541Srgrimesvoid vmtotal __P((struct vmtotal *)); 1201541Srgrimesvoid vnode_pager_setsize __P((struct vnode *, u_long)); 1211541Srgrimesvoid vnode_pager_umount __P((struct mount *)); 1221541Srgrimesboolean_t vnode_pager_uncache __P((struct vnode *)); 1231541Srgrimesvoid vslock __P((caddr_t, u_int)); 1241541Srgrimesvoid vsunlock __P((caddr_t, u_int, int)); 1251541Srgrimes#endif 126