summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-10-03 18:54:58 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-10-03 18:54:58 +0000
commit05a19cf1799badd6446ac0524c649b5572f2f349 (patch)
tree0f90a55229dfb4871e993c88c78291549ca77fac
parent8ed965f0767037b11167315ae43c879061d55d4b (diff)
entered into RCS
-rw-r--r--ufs/mapbuf.c17
1 files changed, 10 insertions, 7 deletions
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