shithub: patch

Download patch

ref: 18396d36ff419c265060cad4527eb58a00d8e1c8
parent: 3a0587ee001a5ae643695eca9033b29a24a17d4c
author: qwx <qwx@sciops.net>
date: Wed Jan 12 21:20:44 EST 2022

page-del: forgot to update to latest

--- a/page-del
+++ b/page-del
@@ -1,6 +1,6 @@
-diff 855cf4326f5a07d7142c2d8918f5fa856d912b85 uncommitted
---- a/sys/src/cmd/page.c
-+++ b/sys/src/cmd/page.c
+diff c4e30bede2f79c42dacb8c91713abf4a4d91c45c uncommitted
+--- a//sys/src/cmd/page.c
++++ b//sys/src/cmd/page.c
 @@ -74,7 +74,10 @@
  	Czerox,
  	Cwrite,
@@ -111,7 +111,7 @@
  
  	switch(i){
  	case Corigsize:
-@@ -1546,6 +1619,28 @@
+@@ -1546,6 +1619,32 @@
  	case Csnarf:
  		writeaddr(current, "/dev/snarf");
  		break;
@@ -118,8 +118,10 @@
 +	case Cpop:
 +		if(current == nil || !canqlock(current))
 +			break;
-+		if((p = poppage(current)) == current)
++		if((p = poppage(current)) == current){
++			qunlock(current);
 +			break;
++		}
 +	Reset:
 +		current = p;
 +		if(current == nil){
@@ -134,8 +136,10 @@
 +	case Cdelete:
 +		if(current == nil || !canqlock(current))
 +			break;
-+		if((p = delpage(current)) == current)
++		if((p = delpage(current)) == current){
++			qunlock(current);
 +			break;
++		}
 +		goto Reset;
  	case Cnext:
  		forward = 1;