summaryrefslogtreecommitdiff
path: root/libpager
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-04-18 20:00:55 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-04-18 20:00:55 +0000
commitd58ec95706ffbf4161ab8992997dbe807711e180 (patch)
tree0c956519c4f24da4dddefe2819b966ba29fcf787 /libpager
parent43624307682b0657fa6a7979bb3b85f1620b5e5d (diff)
(_pager_lock_object): If SYNC and SHOULD_FLUSH, then turn off
PM_INCORE bits when flush is complete.
Diffstat (limited to 'libpager')
-rw-r--r--libpager/lock-object.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpager/lock-object.c b/libpager/lock-object.c
index 3bc69a03..d5a64959 100644
--- a/libpager/lock-object.c
+++ b/libpager/lock-object.c
@@ -32,6 +32,8 @@ _pager_lock_object (struct pager *p,
{
struct lock_request *lr = 0;
struct anticipation *ant;
+ char *pm_entries;
+ int i;
mutex_lock (&p->interlock);
if (p->pager_state != NORMAL)
@@ -81,6 +83,16 @@ _pager_lock_object (struct pager *p,
lr->next->prevp = lr->prevp;
free (lr);
}
+
+ if (should_flush)
+ {
+ mutex_lock (&p->interlock);
+ _pager_pagemap_resize (p, offset + size);
+ pm_entry = &p->pagemap[offset / __vm_page_size];
+ for (i = 0; i < size / vm_page_size; i++)
+ pm_entries[i] &= ~PM_INCORE;
+ mutex_unlock (&p->interlock);
+ }
}
mutex_unlock (&p->interlock);