From 13de9fd35dd1e8c1cc031b63e92f11cdd40c4c4c Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Mon, 3 Oct 1994 18:54:58 +0000 Subject: entered into RCS --- ufs/mapbuf.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'ufs/mapbuf.c') diff --git a/ufs/mapbuf.c b/ufs/mapbuf.c index a323bdbc..edf432a5 100644 --- a/ufs/mapbuf.c +++ b/ufs/mapbuf.c @@ -21,13 +21,16 @@ #include "ufs.h" -#define MAXMAPMEM (1024 * 1024 * 1024) /* one Gb */ +struct mapbuf *mblist; +spin_lock_t mblistlock = SPIN_LOCK_INITIALIZER; -struct mapbuf +struct mapbuf * +map_region (vm_offset_t diskloc, vm_size_t length) { - vm_size_t length; - vm_offset_t diskaddr; -}; + struct mapbuf *mb; + + /* Check to see if we are already mapping this region */ + spin_lock (&mblistlock); + for (mb = mblist; mb; mb = mb->next) + { -void * -map_region -- cgit v1.2.3