summaryrefslogtreecommitdiff
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index dc7421f0971a..2f6c2c5a06e7 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.c,v 1.126 1998/08/06 08:33:19 dfr Exp $
+ * $Id: vm_object.c,v 1.127 1998/08/24 08:39:37 dfr Exp $
*/
/*
@@ -461,7 +461,7 @@ vm_object_terminate(object)
if (p->busy || (p->flags & PG_BUSY))
printf("vm_object_terminate: freeing busy page\n");
#endif
- PAGE_SET_FLAG(p, PG_BUSY);
+ vm_page_busy(p);
vm_page_free(p);
cnt.v_pfree++;
}
@@ -550,7 +550,7 @@ vm_object_page_clean(object, start, end, flags)
}
for(p = TAILQ_FIRST(&object->memq); p; p = TAILQ_NEXT(p, listq)) {
- PAGE_SET_FLAG(p, PG_CLEANCHK);
+ vm_page_flag_set(p, PG_CLEANCHK);
vm_page_protect(p, VM_PROT_READ);
}
@@ -569,19 +569,19 @@ rescan:
(pi < tstart) || (pi >= tend) ||
(p->valid == 0) ||
((p->queue - p->pc) == PQ_CACHE)) {
- PAGE_CLEAR_FLAG(p, PG_CLEANCHK);
+ vm_page_flag_clear(p, PG_CLEANCHK);
continue;
}
vm_page_test_dirty(p);
if ((p->dirty & p->valid) == 0) {
- PAGE_CLEAR_FLAG(p, PG_CLEANCHK);
+ vm_page_flag_clear(p, PG_CLEANCHK);
continue;
}
s = splvm();
while ((p->flags & PG_BUSY) || p->busy) {
- PAGE_SET_FLAG(p, PG_WANTED | PG_REFERENCED);
+ vm_page_flag_set(p, PG_WANTED | PG_REFERENCED);
tsleep(p, PVM, "vpcwai", 0);
if (object->generation != curgeneration) {
splx(s);
@@ -597,12 +597,12 @@ rescan:
(tp->busy != 0))
break;
if((tp->queue - tp->pc) == PQ_CACHE) {
- PAGE_CLEAR_FLAG(tp, PG_CLEANCHK);
+ vm_page_flag_clear(tp, PG_CLEANCHK);
break;
}
vm_page_test_dirty(tp);
if ((tp->dirty & tp->valid) == 0) {
- PAGE_CLEAR_FLAG(tp, PG_CLEANCHK);
+ vm_page_flag_clear(tp, PG_CLEANCHK);
break;
}
maf[ i - 1 ] = tp;
@@ -622,12 +622,12 @@ rescan:
(tp->busy != 0))
break;
if((tp->queue - tp->pc) == PQ_CACHE) {
- PAGE_CLEAR_FLAG(tp, PG_CLEANCHK);
+ vm_page_flag_clear(tp, PG_CLEANCHK);
break;
}
vm_page_test_dirty(tp);
if ((tp->dirty & tp->valid) == 0) {
- PAGE_CLEAR_FLAG(tp, PG_CLEANCHK);
+ vm_page_flag_clear(tp, PG_CLEANCHK);
break;
}
mab[ i - 1 ] = tp;
@@ -641,14 +641,14 @@ rescan:
for(i=0;i<maxb;i++) {
int index = (maxb - i) - 1;
ma[index] = mab[i];
- PAGE_CLEAR_FLAG(ma[index], PG_CLEANCHK);
+ vm_page_flag_clear(ma[index], PG_CLEANCHK);
}
- PAGE_CLEAR_FLAG(p, PG_CLEANCHK);
+ vm_page_flag_clear(p, PG_CLEANCHK);
ma[maxb] = p;
for(i=0;i<maxf;i++) {
int index = (maxb + i) + 1;
ma[index] = maf[i];
- PAGE_CLEAR_FLAG(ma[index], PG_CLEANCHK);
+ vm_page_flag_clear(ma[index], PG_CLEANCHK);
}
runlen = maxb + maxf + 1;
@@ -657,7 +657,7 @@ rescan:
for (i = 0; i<runlen; i++) {
if (ma[i]->valid & ma[i]->dirty) {
vm_page_protect(ma[i], VM_PROT_READ);
- PAGE_SET_FLAG(ma[i], PG_CLEANCHK);
+ vm_page_flag_set(ma[i], PG_CLEANCHK);
}
}
if (object->generation != curgeneration)
@@ -941,7 +941,7 @@ vm_object_qcollapse(object)
p = next;
continue;
}
- PAGE_SET_FLAG(p, PG_BUSY);
+ vm_page_busy(p);
new_pindex = p->pindex - backing_offset_index;
if (p->pindex < backing_offset_index ||
@@ -1066,7 +1066,7 @@ vm_object_collapse(object)
while ((p = TAILQ_FIRST(&backing_object->memq)) != 0) {
new_pindex = p->pindex - backing_offset_index;
- PAGE_SET_FLAG(p, PG_BUSY);
+ vm_page_busy(p);
/*
* If the parent has a page here, or if this
@@ -1216,7 +1216,7 @@ vm_object_collapse(object)
p = TAILQ_NEXT(p, listq)) {
new_pindex = p->pindex - backing_offset_index;
- PAGE_SET_FLAG(p, PG_BUSY);
+ vm_page_busy(p);
/*
* If the parent has a page here, or if this
@@ -1232,24 +1232,24 @@ vm_object_collapse(object)
pp = vm_page_lookup(object, new_pindex);
if ((pp == NULL) || (pp->flags & PG_BUSY) || pp->busy) {
- PAGE_WAKEUP(p);
+ vm_page_wakeup(p);
return;
}
- PAGE_SET_FLAG(pp, PG_BUSY);
+ vm_page_busy(pp);
if ((pp->valid == 0) &&
!vm_pager_has_page(object, OFF_TO_IDX(object->paging_offset) + new_pindex, NULL, NULL)) {
/*
* Page still needed. Can't go any
* further.
*/
- PAGE_WAKEUP(pp);
- PAGE_WAKEUP(p);
+ vm_page_wakeup(pp);
+ vm_page_wakeup(p);
return;
}
- PAGE_WAKEUP(pp);
+ vm_page_wakeup(pp);
}
- PAGE_WAKEUP(p);
+ vm_page_wakeup(p);
}
/*
@@ -1341,7 +1341,7 @@ again:
continue;
}
- PAGE_SET_FLAG(p, PG_BUSY);
+ vm_page_busy(p);
vm_page_protect(p, VM_PROT_NONE);
vm_page_free(p);
}
@@ -1374,7 +1374,7 @@ again:
}
}
- PAGE_SET_FLAG(p, PG_BUSY);
+ vm_page_busy(p);
vm_page_protect(p, VM_PROT_NONE);
vm_page_free(p);
}