xref: /original-bsd/sys/vm/vm_extern.h (revision 27393bdf)
1 /*-
2  * Copyright (c) 1992, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)vm_extern.h	8.4 (Berkeley) 02/19/95
8  */
9 
10 struct buf;
11 struct loadavg;
12 struct proc;
13 struct vmspace;
14 struct vmtotal;
15 struct mount;
16 struct vnode;
17 
18 #ifdef KGDB
19 void		 chgkprot __P((caddr_t, int, int));
20 #endif
21 
22 #ifdef KERNEL
23 #ifdef TYPEDEF_FOR_UAP
24 int		 compat_43_getpagesize __P((struct proc *p, void *, int *));
25 int		 madvise __P((struct proc *, void *, int *));
26 int		 mincore __P((struct proc *, void *, int *));
27 int		 mprotect __P((struct proc *, void *, int *));
28 int		 msync __P((struct proc *, void *, int *));
29 int		 munmap __P((struct proc *, void *, int *));
30 int		 obreak __P((struct proc *, void *, int *));
31 int		 sbrk __P((struct proc *, void *, int *));
32 int		 smmap __P((struct proc *, void *, int *));
33 int		 sstk __P((struct proc *, void *, int *));
34 #endif
35 
36 void		 assert_wait __P((void *, boolean_t));
37 int		 grow __P((struct proc *, vm_offset_t));
38 void		 iprintf __P((const char *, ...));
39 int		 kernacc __P((caddr_t, int, int));
40 int		 kinfo_loadavg __P((int, char *, int *, int, int *));
41 int		 kinfo_meter __P((int, caddr_t, int *, int, int *));
42 vm_offset_t	 kmem_alloc __P((vm_map_t, vm_size_t));
43 vm_offset_t	 kmem_alloc_pageable __P((vm_map_t, vm_size_t));
44 vm_offset_t	 kmem_alloc_wait __P((vm_map_t, vm_size_t));
45 void		 kmem_free __P((vm_map_t, vm_offset_t, vm_size_t));
46 void		 kmem_free_wakeup __P((vm_map_t, vm_offset_t, vm_size_t));
47 void		 kmem_init __P((vm_offset_t, vm_offset_t));
48 vm_offset_t	 kmem_malloc __P((vm_map_t, vm_size_t, boolean_t));
49 vm_map_t	 kmem_suballoc __P((vm_map_t, vm_offset_t *, vm_offset_t *,
50 		    vm_size_t, boolean_t));
51 void		 loadav __P((struct loadavg *));
52 void		 munmapfd __P((struct proc *, int));
53 int		 pager_cache __P((vm_object_t, boolean_t));
54 void		 sched __P((void));
55 int		 svm_allocate __P((struct proc *, void *, int *));
56 int		 svm_deallocate __P((struct proc *, void *, int *));
57 int		 svm_inherit __P((struct proc *, void *, int *));
58 int		 svm_protect __P((struct proc *, void *, int *));
59 void		 swapinit __P((void));
60 int		 swapon __P((struct proc *, void *, int *));
61 void		 swapout __P((struct proc *));
62 void		 swapout_threads __P((void));
63 int		 swfree __P((struct proc *, int));
64 void		 swstrategy __P((struct buf *));
65 void		 thread_block __P((void));
66 void		 thread_sleep __P((void *, simple_lock_t, boolean_t));
67 void		 thread_wakeup __P((void *));
68 int		 useracc __P((caddr_t, int, int));
69 int		 vm_allocate __P((vm_map_t,
70 		    vm_offset_t *, vm_size_t, boolean_t));
71 int		 vm_allocate_with_pager __P((vm_map_t, vm_offset_t *,
72 		    vm_size_t, boolean_t, vm_pager_t, vm_offset_t, boolean_t));
73 int		 vm_deallocate __P((vm_map_t, vm_offset_t, vm_size_t));
74 int		 vm_fault __P((vm_map_t, vm_offset_t, vm_prot_t, boolean_t));
75 void		 vm_fault_copy_entry __P((vm_map_t,
76 		    vm_map_t, vm_map_entry_t, vm_map_entry_t));
77 void		 vm_fault_unwire __P((vm_map_t, vm_offset_t, vm_offset_t));
78 int		 vm_fault_wire __P((vm_map_t, vm_offset_t, vm_offset_t));
79 int		 vm_fork __P((struct proc *, struct proc *, int));
80 int		 vm_inherit __P((vm_map_t,
81 		    vm_offset_t, vm_size_t, vm_inherit_t));
82 void		 vm_init_limits __P((struct proc *));
83 void		 vm_mem_init __P((void));
84 int		 vm_mmap __P((vm_map_t, vm_offset_t *, vm_size_t,
85 		    vm_prot_t, vm_prot_t, int, caddr_t, vm_offset_t));
86 int		 vm_protect __P((vm_map_t,
87 		    vm_offset_t, vm_size_t, boolean_t, vm_prot_t));
88 void		 vm_set_page_size __P((void));
89 void		 vmmeter __P((void));
90 struct vmspace	*vmspace_alloc __P((vm_offset_t, vm_offset_t, int));
91 struct vmspace	*vmspace_fork __P((struct vmspace *));
92 void		 vmspace_free __P((struct vmspace *));
93 void		 vmtotal __P((struct vmtotal *));
94 void		 vnode_pager_setsize __P((struct vnode *, u_long));
95 void		 vnode_pager_umount __P((struct mount *));
96 boolean_t	 vnode_pager_uncache __P((struct vnode *));
97 void		 vslock __P((caddr_t, u_int));
98 void		 vsunlock __P((caddr_t, u_int, int));
99 #endif
100