From 861aeb3ba157ad55d5d521410aba8ae8ac80a47a Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 13 Dec 1994 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1994-12-13 --- port/page.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/port/page.c b/port/page.c index b4be28e393912f5214a9b7d03d826adfc82c2bfe..bf06b6f9e609bdb15ee18b28cdbfda8053716c5a 100644 --- a/port/page.c +++ b/port/page.c @@ -68,6 +68,7 @@ newpage(int clear, Segment **s, ulong va) { Page *p; KMap *k; + uchar ct; int i, hw, dontalloc, color; @@ -117,10 +118,11 @@ retry: if(p->color == color) break; + ct = PG_NOFLUSH; if(p == 0) { p = palloc.head; - memset(p->cachectl, PG_NEWCOL, sizeof(p->cachectl)); p->color = color; + ct = PG_NEWCOL; } if(p->prev) @@ -150,7 +152,7 @@ retry: p->va = va; p->modref = 0; for(i = 0; i < MAXMACH; i++) - p->cachectl[i] = PG_NOFLUSH; + p->cachectl[i] = ct; unlock(p); if(clear) {