vm_extern.h revision 2462
133965Sjdp/*-
278828Sobrien * Copyright (c) 1992, 1993
391041Sobrien *	The Regents of the University of California.  All rights reserved.
433965Sjdp *
533965Sjdp * Redistribution and use in source and binary forms, with or without
633965Sjdp * modification, are permitted provided that the following conditions
733965Sjdp * are met:
833965Sjdp * 1. Redistributions of source code must retain the above copyright
933965Sjdp *    notice, this list of conditions and the following disclaimer.
1033965Sjdp * 2. Redistributions in binary form must reproduce the above copyright
1133965Sjdp *    notice, this list of conditions and the following disclaimer in the
1233965Sjdp *    documentation and/or other materials provided with the distribution.
1333965Sjdp * 3. All advertising materials mentioning features or use of this software
1433965Sjdp *    must display the following acknowledgement:
1533965Sjdp *	This product includes software developed by the University of
1633965Sjdp *	California, Berkeley and its contributors.
1733965Sjdp * 4. Neither the name of the University nor the names of its contributors
1833965Sjdp *    may be used to endorse or promote products derived from this software
1933965Sjdp *    without specific prior written permission.
2033965Sjdp *
2133965Sjdp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2233965Sjdp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2333965Sjdp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2433965Sjdp * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2533965Sjdp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2633965Sjdp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2733965Sjdp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2833965Sjdp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2960484Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3033965Sjdp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3133965Sjdp * SUCH DAMAGE.
3233965Sjdp *
3333965Sjdp *	@(#)vm_extern.h	8.2 (Berkeley) 1/12/94
3433965Sjdp * $Id: vm_extern.h,v 1.4 1994/08/21 07:19:44 paul Exp $
3533965Sjdp */
3633965Sjdp
3733965Sjdp#ifndef _VM_VM_EXTERN_H_
3833965Sjdp#define _VM_VM_EXTERN_H_
3933965Sjdp
4033965Sjdpstruct buf;
4133965Sjdpstruct loadavg;
4233965Sjdpstruct proc;
4333965Sjdpstruct vmspace;
4433965Sjdpstruct vmtotal;
4533965Sjdpstruct mount;
4633965Sjdpstruct vnode;
4733965Sjdp
4833965Sjdp#ifdef KGDB
4933965Sjdpvoid		 chgkprot __P((caddr_t, int, int));
5033965Sjdp#endif
5133965Sjdp
5233965Sjdp/*
5333965Sjdp * Try to get semi-meaningful wait messages into thread_sleep...
5433965Sjdp */
5533965Sjdpextern void thread_sleep_(int, simple_lock_t, char *);
5633965Sjdp#if __GNUC__ >= 2
5733965Sjdp#define thread_sleep(a,b,c) thread_sleep_((a), (b), __FUNCTION__)
5833965Sjdp#else
5933965Sjdp#define thread_sleep(a,b,c) thread_sleep_((a), (b), "vmslp")
6033965Sjdp#endif
6133965Sjdp
6233965Sjdp#ifdef KERNEL
6333965Sjdp#ifdef TYPEDEF_FOR_UAP
6433965Sjdpint		 getpagesize __P((struct proc *p, void *, int *));
6533965Sjdpint		 madvise __P((struct proc *, void *, int *));
6633965Sjdpint		 mincore __P((struct proc *, void *, int *));
6733965Sjdpint		 mprotect __P((struct proc *, void *, int *));
6891041Sobrienint		 msync __P((struct proc *, void *, int *));
6933965Sjdpint		 munmap __P((struct proc *, void *, int *));
7033965Sjdpint		 obreak __P((struct proc *, void *, int *));
7191041Sobrienint		 sbrk __P((struct proc *, void *, int *));
7233965Sjdpint		 smmap __P((struct proc *, void *, int *));
7333965Sjdpint		 sstk __P((struct proc *, void *, int *));
7491041Sobrien#endif
7533965Sjdp
7633965Sjdpvoid		 assert_wait __P((int, boolean_t));
7791041Sobrienint		 grow __P((struct proc *, u_int));
7833965Sjdpvoid		 iprintf __P((const char *, ...));
7933965Sjdpint		 kernacc __P((caddr_t, int, int));
8091041Sobrienint		 kinfo_loadavg __P((int, char *, int *, int, int *));
8133965Sjdpint		 kinfo_meter __P((int, caddr_t, int *, int, int *));
8233965Sjdpvm_offset_t	 kmem_alloc __P((vm_map_t, vm_size_t));
8391041Sobrienvm_offset_t	 kmem_alloc_pageable __P((vm_map_t, vm_size_t));
8433965Sjdpvm_offset_t	 kmem_alloc_wait __P((vm_map_t, vm_size_t));
8533965Sjdpvoid		 kmem_free __P((vm_map_t, vm_offset_t, vm_size_t));
8691041Sobrienvoid		 kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t));
8733965Sjdpvoid		 kmem_init __P((vm_offset_t, vm_offset_t));
8833965Sjdpvm_offset_t	 kmem_malloc __P((vm_map_t, vm_size_t, boolean_t));
8989857Sobrienvm_map_t	 kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *,
9089857Sobrien		    vm_size_t, boolean_t));
9189857Sobrienvoid		 loadav __P((struct loadavg *));
9289857Sobrienvoid		 munmapfd __P((struct proc *, int));
9333965Sjdpint		 pager_cache __P((vm_object_t, boolean_t));
9433965Sjdpvoid		 sched __P((void));
9533965Sjdpint		 svm_allocate __P((struct proc *, void *, int *));
9633965Sjdpint		 svm_deallocate __P((struct proc *, void *, int *));
9733965Sjdpint		 svm_inherit __P((struct proc *, void *, int *));
9833965Sjdpint		 svm_protect __P((struct proc *, void *, int *));
9933965Sjdpvoid		 swapinit __P((void));
10091041Sobrienint		 swapon __P((struct proc *, void *, int *));
10133965Sjdpvoid		 swapout __P((struct proc *));
10233965Sjdpvoid		 swapout_threads __P((void));
10391041Sobrienint		 swfree __P((struct proc *, int));
10433965Sjdpvoid		 swstrategy __P((struct buf *));
10533965Sjdpvoid		 thread_block __P((char *));
10691041Sobrienvoid		 thread_sleep __P((int, simple_lock_t, boolean_t));
10733965Sjdpvoid		 thread_wakeup __P((int));
10833965Sjdpint		 useracc __P((caddr_t, int, int));
10991041Sobrienint		 vm_allocate __P((vm_map_t,
11033965Sjdp		    vm_offset_t *, vm_size_t, boolean_t));
11133965Sjdpint		 vm_allocate_with_pager __P((vm_map_t, vm_offset_t *,
11291041Sobrien		    vm_size_t, boolean_t, vm_pager_t, vm_offset_t, boolean_t));
11391041Sobrienint		 vm_deallocate __P((vm_map_t, vm_offset_t, vm_size_t));
11491041Sobrienint		 vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t));
11533965Sjdpvoid		 vm_fault_copy_entry __P((vm_map_t,
11633965Sjdp		    vm_map_t, vm_map_entry_t, vm_map_entry_t));
11733965Sjdpvoid		 vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t));
11833965Sjdpint		 vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
11933965Sjdpint		 vm_fork __P((struct proc *, struct proc *, int));
12033965Sjdpint		 vm_inherit __P((vm_map_t,
12133965Sjdp		    vm_offset_t, vm_size_t, vm_inherit_t));
12233965Sjdpvoid		 vm_init_limits __P((struct proc *));
12333965Sjdpvoid		 vm_mem_init __P((void));
12433965Sjdpint		 vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t,
12533965Sjdp		    vm_prot_t, vm_prot_t, int, caddr_t, vm_offset_t));
12633965Sjdpint		 vm_protect __P((vm_map_t,
12733965Sjdp		    vm_offset_t, vm_size_t, boolean_t, vm_prot_t));
12833965Sjdpvoid		 vm_set_page_size __P((void));
12933965Sjdpvoid		 vmmeter __P((void));
13033965Sjdpstruct vmspace	*vmspace_alloc __P((vm_offset_t, vm_offset_t, int));
13133965Sjdpstruct vmspace	*vmspace_fork __P((struct vmspace *));
13233965Sjdpvoid		 vmspace_free __P((struct vmspace *));
13333965Sjdpvoid		 vmtotal __P((struct vmtotal *));
13433965Sjdpvoid		 vnode_pager_setsize __P((struct vnode *, u_long));
13533965Sjdpvoid		 vnode_pager_umount __P((struct mount *));
13633965Sjdpboolean_t	 vnode_pager_uncache __P((struct vnode *));
13733965Sjdpvoid		 vslock __P((caddr_t, u_int));
13833965Sjdpvoid		 vsunlock __P((caddr_t, u_int, int));
13933965Sjdp#endif
14033965Sjdp
14133965Sjdp#endif
14233965Sjdp