shithub: mc

Download patch

ref: 317eb918900dfe2a9e37fcc5acde58400b143f5a
parent: 306763569e09bc8a6940b54f879a03d3ff8f3b65
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Dec 11 21:00:48 EST 2015

Build under the new init-before-use regime

--- a/lib/thread/mutex+linux.myr
+++ b/lib/thread/mutex+linux.myr
@@ -31,6 +31,7 @@
 	/* 
 	Uncontended case: we get an unlocked mutex, and we lock it.
 	*/
+        c = Locked
 	for var i = 0; i < nspin; i++
 		c = xcas(&mtx._state, Unlocked, Locked) 
 		if c == Unlocked