code: plan9front

Download patch

ref: 69793014c2b902bae193b03e992e5d9a43628f85
parent: 6e33b8e40b38bd288768b8c854805e76fec51858
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Apr 6 19:18:35 EDT 2024

pc, pc64: fix rlock: nlocks 1 print from vga

bootscreenconf() must not be called
with locks held as we are calling into
devenv which arquires rwlocks.

--- a/sys/src/9/pc/screen.c
+++ b/sys/src/9/pc/screen.c
@@ -147,10 +147,10 @@
 		error(err);
 
 	vgaimageinit(chan);
-	bootscreenconf(scr);
-
 	unlock(&vgascreenlock);
 	poperror();
+
+	bootscreenconf(scr);
 
 	drawcmap();