Skip to main content
summaryrefslogtreecommitdiffstats
blob: c56d3f3edbc1a29d31437557d9e9a6dde77afde3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<h2 >The <code>upc_lock_free</code> function   </h2>

<h4>Synopsis</h4>
<p>

<pre> 
    #include &lt;upc.h&gt;
    upc_lock_t *upc_lock_free(upc_lock_t *ptr);                     
</pre>

<p>
<h4>Description</h4>

<p>
The <code>upc_lock_free</code>    function  frees all resources associated with the dynamically
allocated <code>upc_lock_t</code> pointed to by <code>ptr</code>. 
If <code>ptr</code> is a null pointer, no
action occurs. 
Otherwise, if the argument does not match a pointer earlier
returned by the <code>upc_global_lock_alloc</code> or 
<code>upc_all_lock_alloc</code> function,
or if the lock has been deallocated by a previous call to <code>upc_lock_free</code>,
the behavior is undefined.
<p>
<code>upc_lock_free</code> succeeds regardless of whether the referenced lock is currently
unlocked or currently locked (by any thread).
<p>Any subsequent calls to locking functions from any thread using <code>ptr</code> have
undefined effects. This also applies to any thread currently calling <code>upc_lock</code>.
<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>

Back to the top