shithub: riscv

Download patch

ref: 441a33970d88a29e628ca1b6866295df87194d8c
parent: 5c34facdb3d30195a636ba04321e2e6d0c371bc5
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Sat Sep 10 03:14:29 EDT 2011

npage: make flush synchronous

--- a/sys/src/cmd/npage.c
+++ b/sys/src/cmd/npage.c
@@ -600,7 +600,9 @@
 	Page *p;
 
 	for(p = root->down; p; p = nextpage(p)){
-		if(!canqlock(p))
+		if(age == 0)	/* synchronous flush */
+			qlock(p);
+		else if(!canqlock(p))
 			continue;
 		if((pagegen - p->gen) >= age)
 			unloadpage(p);
@@ -930,6 +932,7 @@
 					rotate = 0;
 				Unload:
 					viewgen++;
+					esetcursor(&reading);
 					unloadpages(0);
 					showpage(current);
 					continue;