summaryrefslogtreecommitdiff
path: root/ufs/mapbuf.c
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
commit13de9fd35dd1e8c1cc031b63e92f11cdd40c4c4c (patch)
tree18aafb79b308275c09af40389c9b288eb970d04c /ufs/mapbuf.c
parent5f4b8ddda0f01e59b9a20c8e7558b0b9e6ead89d (diff)
entered into RCS
Diffstat (limited to 'ufs/mapbuf.c')
-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