ss="pre">0</span></tt> on error.</p>
<pre class="listing"><span class="Keyword">var</span>
  <span class="Identifier">tls_lock</span><span class="Punctuation">:</span> <span class="Identifier">SpinLock</span>
  <span class="Identifier">thread_local_storage</span><span class="Punctuation">:</span> <span class="Identifier">SDL_TLSID</span>

<span class="Keyword">proc</span> <span class="Identifier">setMyThreadData</span><span class="Punctuation">(</span><span class="Identifier">value</span><span class="Punctu