From 92c385361ba29b99b272175645421c55324fdd05 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sat, 14 Jan 1995 04:58:53 +0000 Subject: [PATCH] Add missing object_lock/unlock. --- sys/amd64/amd64/pmap.c | 6 +++++- sys/i386/i386/pmap.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index d8f550153471..73934e581ef2 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.39 1994/12/18 14:16:22 davidg Exp $ + * $Id: pmap.c,v 1.40 1995/01/09 16:04:38 davidg Exp $ */ /* @@ -1504,6 +1504,9 @@ pmap_object_init_pt(pmap, addr, object, offset, size) if (!pmap) return; + if (!vm_object_lock_try(object)) + return; + /* * if we are processing a major portion of the object, then * scan the entire thing. @@ -1552,6 +1555,7 @@ pmap_object_init_pt(pmap, addr, object, offset, size) } } } + vm_object_unlock(object); } /* diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index d8f550153471..73934e581ef2 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.39 1994/12/18 14:16:22 davidg Exp $ + * $Id: pmap.c,v 1.40 1995/01/09 16:04:38 davidg Exp $ */ /* @@ -1504,6 +1504,9 @@ pmap_object_init_pt(pmap, addr, object, offset, size) if (!pmap) return; + if (!vm_object_lock_try(object)) + return; + /* * if we are processing a major portion of the object, then * scan the entire thing. @@ -1552,6 +1555,7 @@ pmap_object_init_pt(pmap, addr, object, offset, size) } } } + vm_object_unlock(object); } /*