Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
[unix-history] / sys / vm / vm_fault.c
index a59988f..d8b36f4 100644 (file)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  * 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
+ *     $Id$
+ */
+
+/*
  * Copyright (c) 1987, 1990 Carnegie-Mellon University.
  * All rights reserved.
  *
  * Copyright (c) 1987, 1990 Carnegie-Mellon University.
  * All rights reserved.
  *
@@ -62,8 +64,6 @@
  * rights to redistribute these changes.
  */
 
  * rights to redistribute these changes.
  */
 
-static char rcsid[] = "$Header: /home/cvs/386BSD/src/sys.386bsd/vm/vm_fault.c,v 1.1.1.1 93/06/12 14:57:40 rgrimes Exp $";
-
 /*
  *     Page fault handling module.
  */
 /*
  *     Page fault handling module.
  */
@@ -246,7 +246,6 @@ vm_fault(map, vaddr, fault_type, change_wiring)
 
                                PAGE_ASSERT_WAIT(m, !change_wiring);
                                UNLOCK_THINGS;
 
                                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);
                                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;
 
                                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);
                                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_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();
 
                        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;
                                        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);
                                        thread_block();
                                        wait_result = current_thread()->wait_result;
                                        vm_object_deallocate(first_object);