153346Sbostic /*- 263379Sbostic * Copyright (c) 1992, 1993 363379Sbostic * The Regents of the University of California. All rights reserved. 453346Sbostic * 553346Sbostic * %sccs.include.redist.c% 653346Sbostic * 7*68164Scgd * @(#)vm_extern.h 8.3 (Berkeley) 01/09/95 853346Sbostic */ 953346Sbostic 1053346Sbostic struct buf; 1153346Sbostic struct loadavg; 1253346Sbostic struct proc; 1353346Sbostic struct vmspace; 1453346Sbostic struct vmtotal; 1553346Sbostic struct mount; 1653361Sbostic struct vnode; 1753346Sbostic 1853346Sbostic #ifdef KGDB 1953346Sbostic void chgkprot __P((caddr_t, int, int)); 2053346Sbostic #endif 2153346Sbostic 2253450Sbostic #ifdef KERNEL 2353346Sbostic #ifdef TYPEDEF_FOR_UAP 2453346Sbostic int getpagesize __P((struct proc *p, void *, int *)); 2553346Sbostic int madvise __P((struct proc *, void *, int *)); 2653346Sbostic int mincore __P((struct proc *, void *, int *)); 2753346Sbostic int mprotect __P((struct proc *, void *, int *)); 2853346Sbostic int msync __P((struct proc *, void *, int *)); 2953346Sbostic int munmap __P((struct proc *, void *, int *)); 3053346Sbostic int obreak __P((struct proc *, void *, int *)); 3153346Sbostic int sbrk __P((struct proc *, void *, int *)); 3253346Sbostic int smmap __P((struct proc *, void *, int *)); 3353346Sbostic int sstk __P((struct proc *, void *, int *)); 3453346Sbostic #endif 3553346Sbostic 36*68164Scgd void assert_wait __P((void *, boolean_t)); 37*68164Scgd int grow __P((struct proc *, vm_offset_t)); 3853346Sbostic void iprintf __P((const char *, ...)); 3953346Sbostic int kernacc __P((caddr_t, int, int)); 4053346Sbostic int kinfo_loadavg __P((int, char *, int *, int, int *)); 4153346Sbostic int kinfo_meter __P((int, caddr_t, int *, int, int *)); 4253346Sbostic vm_offset_t kmem_alloc __P((vm_map_t, vm_size_t)); 4353346Sbostic vm_offset_t kmem_alloc_pageable __P((vm_map_t, vm_size_t)); 4453346Sbostic vm_offset_t kmem_alloc_wait __P((vm_map_t, vm_size_t)); 4553346Sbostic void kmem_free __P((vm_map_t, vm_offset_t, vm_size_t)); 4653346Sbostic void kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t)); 4753346Sbostic void kmem_init __P((vm_offset_t, vm_offset_t)); 4853346Sbostic vm_offset_t kmem_malloc __P((vm_map_t, vm_size_t, boolean_t)); 4953346Sbostic vm_map_t kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *, 5053346Sbostic vm_size_t, boolean_t)); 5153346Sbostic void loadav __P((struct loadavg *)); 52*68164Scgd void munmapfd __P((struct proc *, int)); 5353346Sbostic int pager_cache __P((vm_object_t, boolean_t)); 5453346Sbostic void sched __P((void)); 5553346Sbostic int svm_allocate __P((struct proc *, void *, int *)); 5653346Sbostic int svm_deallocate __P((struct proc *, void *, int *)); 5753346Sbostic int svm_inherit __P((struct proc *, void *, int *)); 5853346Sbostic int svm_protect __P((struct proc *, void *, int *)); 5953346Sbostic void swapinit __P((void)); 6053346Sbostic int swapon __P((struct proc *, void *, int *)); 6153346Sbostic void swapout __P((struct proc *)); 6253346Sbostic void swapout_threads __P((void)); 6353346Sbostic int swfree __P((struct proc *, int)); 6453346Sbostic void swstrategy __P((struct buf *)); 6553346Sbostic void thread_block __P((void)); 66*68164Scgd void thread_sleep __P((void *, simple_lock_t, boolean_t)); 67*68164Scgd void thread_wakeup __P((void *)); 6853346Sbostic int useracc __P((caddr_t, int, int)); 6953346Sbostic int vm_allocate __P((vm_map_t, 7053346Sbostic vm_offset_t *, vm_size_t, boolean_t)); 7153346Sbostic int vm_allocate_with_pager __P((vm_map_t, vm_offset_t *, 7253346Sbostic vm_size_t, boolean_t, vm_pager_t, vm_offset_t, boolean_t)); 7353346Sbostic int vm_deallocate __P((vm_map_t, vm_offset_t, vm_size_t)); 7453346Sbostic int vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t)); 7553346Sbostic void vm_fault_copy_entry __P((vm_map_t, 7653346Sbostic vm_map_t, vm_map_entry_t, vm_map_entry_t)); 7753346Sbostic void vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t)); 7858590Shibler int vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t)); 7953346Sbostic int vm_fork __P((struct proc *, struct proc *, int)); 8053346Sbostic int vm_inherit __P((vm_map_t, 8153346Sbostic vm_offset_t, vm_size_t, vm_inherit_t)); 8253346Sbostic void vm_init_limits __P((struct proc *)); 8353346Sbostic void vm_mem_init __P((void)); 8458590Shibler int vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t, 8558590Shibler vm_prot_t, vm_prot_t, int, caddr_t, vm_offset_t)); 8653346Sbostic int vm_protect __P((vm_map_t, 8753346Sbostic vm_offset_t, vm_size_t, boolean_t, vm_prot_t)); 8853346Sbostic void vm_set_page_size __P((void)); 8953346Sbostic void vmmeter __P((void)); 9053346Sbostic struct vmspace *vmspace_alloc __P((vm_offset_t, vm_offset_t, int)); 9153346Sbostic struct vmspace *vmspace_fork __P((struct vmspace *)); 9253346Sbostic void vmspace_free __P((struct vmspace *)); 9353346Sbostic void vmtotal __P((struct vmtotal *)); 9453346Sbostic void vnode_pager_setsize __P((struct vnode *, u_long)); 9553346Sbostic void vnode_pager_umount __P((struct mount *)); 9653346Sbostic boolean_t vnode_pager_uncache __P((struct vnode *)); 9753346Sbostic void vslock __P((caddr_t, u_int)); 9853346Sbostic void vsunlock __P((caddr_t, u_int, int)); 9953450Sbostic #endif 100