--- Net2/vm/vm_fault.c 2018/04/24 18:09:15 1.1.1.3 +++ Net2/vm/vm_fault.c 2018/04/24 18:14:52 1.1.1.4 @@ -33,7 +33,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)vm_fault.c 7.6 (Berkeley) 5/7/91 + * from: @(#)vm_fault.c 7.6 (Berkeley) 5/7/91 + * vm_fault.c,v 1.6.2.1 1993/07/25 21:25:21 cgd Exp * * * Copyright (c) 1987, 1990 Carnegie-Mellon University. @@ -62,8 +63,6 @@ * rights to redistribute these changes. */ -static char rcsid[] = "$Header: /var/lib/cvsd/net2/Net2/vm/vm_fault.c,v 1.1.1.3 2018/04/24 18:09:15 root Exp $"; - /* * Page fault handling module. */ @@ -92,6 +91,7 @@ static char rcsid[] = "$Header: /var/lib * The map in question must be referenced, and remains so. * Caller may hold no locks. */ +int vm_fault(map, vaddr, fault_type, change_wiring) vm_map_t map; vm_offset_t vaddr; @@ -246,7 +246,6 @@ vm_fault(map, vaddr, fault_type, change_ PAGE_ASSERT_WAIT(m, !change_wiring); UNLOCK_THINGS; -thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */ thread_block(); wait_result = current_thread()->wait_result; vm_object_deallocate(first_object); @@ -280,7 +279,6 @@ thread_wakeup(&vm_pages_needed); /* XXX! PAGE_ASSERT_WAIT(m, !change_wiring); UNLOCK_THINGS; -thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */ thread_block(); wait_result = current_thread()->wait_result; vm_object_deallocate(first_object); @@ -531,6 +529,7 @@ thread_wakeup(&vm_pages_needed); /* XXX vm_page_lock_queues(); vm_page_activate(m); + vm_page_deactivate(m); pmap_page_protect(VM_PAGE_TO_PHYS(m), VM_PROT_NONE); vm_page_unlock_queues(); @@ -627,7 +626,6 @@ thread_wakeup(&vm_pages_needed); /* XXX copy_object->ref_count--; vm_object_unlock(copy_object); UNLOCK_THINGS; -thread_wakeup(&vm_pages_needed); /* XXX! -- what does this do? */ thread_block(); wait_result = current_thread()->wait_result; vm_object_deallocate(first_object); @@ -891,7 +889,6 @@ thread_wakeup(&vm_pages_needed); /* XXX UNLOCK_AND_DEALLOCATE; return(KERN_SUCCESS); - } /* @@ -899,7 +896,8 @@ thread_wakeup(&vm_pages_needed); /* XXX * * Wire down a range of virtual addresses in a map. */ -void vm_fault_wire(map, start, end) +void +vm_fault_wire(map, start, end) vm_map_t map; vm_offset_t start, end; { @@ -933,7 +931,8 @@ void vm_fault_wire(map, start, end) * * Unwire a range of virtual addresses in a map. */ -void vm_fault_unwire(map, start, end) +void +vm_fault_unwire(map, start, end) vm_map_t map; vm_offset_t start, end; { @@ -982,7 +981,8 @@ void vm_fault_unwire(map, start, end) * entry corresponding to a main map entry that is wired down). */ -void vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry) +void +vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry) vm_map_t dst_map; vm_map_t src_map; vm_map_entry_t dst_entry;