title: A tested implementation of Peterson Lock algorithm?
body: <p>Does anyone know of a good/correct implementation of <a href="http://en.wikipedia.org/wiki/Peterson&#39;s_algorithm" rel="noreferrer">Peterson's Lock algorithm</a> in C? I can't seem to find this. Thanks.</p>