blob: b10919e1da4f4ebc6f18ab1f0b67d8b1144697b4 [file] [log] [blame]
<h2 >The <code>upc_lock</code> function </h2>
<h4>Synopsis</h4>
<p>
<pre>
#include &lt;upc.h&gt;
void upc_lock(upc_lock_t *ptr);
</pre>
<p>
<h4>Description</h4>
<p>
The <code>upc_lock</code> function sets the state of the lock pointed to by <code>ptr</code> to locked.
<p>If the lock is already in locked state due to the calling thread setting it to
locked state, the result is undefined.
<p>If the lock is already in locked state, then the calling thread waits for some
other thread to set the state to unlocked.
<p>Once the lock is in state unlocked, a single calling thread sets the state to
locked and the function returns.
<p>A null strict access is implied after a call to upc_lock().
<p>&nbsp
<p>&nbsp
<p><a href="terms.html">Terms, definitions, and symbols</a><br>
<p><a href="index.html">Back to index of all UPC functions</a>