shithub: riscv

Download patch

ref: 44b80d48af82fa8a5d632eb9bf6079c684a672ac
parent: aa6673fcfbe3bc41078487f4ef5d5aea459cd953
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Mar 23 07:19:36 EDT 2016

stats: fix display->locking race

--- a/sys/src/cmd/stats.c
+++ b/sys/src/cmd/stats.c
@@ -1355,11 +1355,11 @@
 		fprint(2, "stats: initdraw failed: %r\n");
 		exits("initdraw");
 	}
+	display->locking = 1;	/* tell library we're using the display lock */
 	colinit();
 	einit(Emouse|Ekeyboard);
 	startproc(inputproc, Inputproc);
 	pids[Mainproc] = getpid();
-	display->locking = 1;	/* tell library we're using the display lock */
 
 	resize();