summaryrefslogtreecommitdiff
path: root/devdocs/c/atomic%2Fkill_dependency.html
blob: 3a4d470f1b6b6f6a78ecc41d02dbcc20551cd2c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
    <h1 id="firstHeading" class="firstHeading">kill_dependency</h1>            <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code>&lt;stdatomic.h&gt;</code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c11"> <td> <pre data-language="c">A kill_dependency( A y );</pre>
</td> <td class="t-dcl-nopad"> </td> <td> <span class="t-mark-rev t-since-c11">(since C11)</span> </td> </tr>  </table> <p>Informs the compiler that the dependency tree started by an <code><a href="memory_order" title="c/atomic/memory order">memory_order_consume</a></code> atomic load operation does not extend past the return value of <code>kill_dependency</code>; that is, the argument does not carry a dependency into the return value.</p>
<p>The function is implemented as a macro. <code>A</code> is the type of <code>y</code>.</p>
<h3 id="Parameters"> Parameters</h3> <table class="t-par-begin"> <tr class="t-par"> <td> y </td> <td> - </td> <td> the expression whose return value is to be removed from a dependency tree </td>
</tr>
</table> <h3 id="Return_value"> Return value</h3> <p>Returns <code>y</code>, no longer a part of a dependency tree.</p>
<h3 id="References"> References</h3>  <ul>
<li> C23 standard (ISO/IEC 9899:2023): </li>
<ul><li> 7.17.3.1 The kill_dependency macro (p: TBD) </li></ul>
<li> C17 standard (ISO/IEC 9899:2018): </li>
<ul><li> 7.17.3.1 The kill_dependency macro (p: 203-204) </li></ul>
<li> C11 standard (ISO/IEC 9899:2011): </li>
<ul><li> 7.17.3.1 The kill_dependency macro (p: 278) </li></ul>
</ul>           <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/atomic/kill_dependency" title="cpp/atomic/kill dependency">C++ documentation</a></span> for <code>kill_dependency</code> </td>
</tr> </table>           <div class="_attribution">
  <p class="_attribution-p">
    &copy; cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br>
    <a href="https://en.cppreference.com/w/c/atomic/kill_dependency" class="_attribution-link">https://en.cppreference.com/w/c/atomic/kill_dependency</a>
  </p>
</div>