Files
hustoj/web/cppreference-zh/chmhelp/c-atomic-atomic_lock_free_consts.html
2025-08-01 12:57:54 +08:00

87 lines
3.6 KiB
HTML

<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
<head><meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ATOMIC_*_LOCK_FREE</title>
<link rel="stylesheet" href="ext.css" />
<link rel="stylesheet" href="site_modules.css" />
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-c_atomic_ATOMIC_LOCK_FREE_consts skin-cppreference2 action-view cpp-navbar">
<div id="cpp-content-base">
<div id="content"><a id="top"></a>
<h1 id="firstHeading" class="firstHeading">ATOMIC_*_LOCK_FREE</h1>
<div id="bodyContent">
<div id="contentSub"><span class="subpages">&lt; <a href="c.html">c</a>&lrm; | <a href="c-atomic.html">atomic</a></span></div>
<div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr" xml:lang="zh">
<table class="t-dcl-begin">
<tbody>
<tr class="t-dsc-header">
<td>
<div>&#23450;&#20041;&#20110;&#22836;&#25991;&#20214; <code>&lt;stdatomic.h&gt;</code></div>
</td>
<td></td>
<td></td>
</tr>
<tr class="t-dcl t-since-c11">
<td>
<div><span class="mw-geshi c source-c"><span class="co2">#define ATOMIC_BOOL_LOCK_FREE &nbsp; &nbsp; /* implementation-defined */</span><br /></span>
<p><span class="co2">#define ATOMIC_CHAR_LOCK_FREE &nbsp; &nbsp; /* implementation-defined */</span><br />
<span class="co2">#define ATOMIC_CHAR16_T_LOCK_FREE /* implementation-defined */</span><br />
<span class="co2">#define ATOMIC_CHAR32_T_LOCK_FREE /* implementation-defined */</span><br />
<span class="co2">#define ATOMIC_WCHAR_T_LOCK_FREE &nbsp;/* implementation-defined */</span><br />
<span class="co2">#define ATOMIC_SHORT_LOCK_FREE &nbsp; &nbsp;/* implementation-defined */</span><br />
<span class="co2">#define ATOMIC_INT_LOCK_FREE &nbsp; &nbsp; &nbsp;/* implementation-defined */</span><br />
<span class="co2">#define ATOMIC_LONG_LOCK_FREE &nbsp; &nbsp; /* implementation-defined */</span><br />
<span class="co2">#define ATOMIC_LLONG_LOCK_FREE &nbsp; &nbsp;/* implementation-defined */</span><br /></p>
<span class="co2">#define ATOMIC_POINTER_LOCK_FREE &nbsp;/* implementation-defined */</span></div>
</td>
<td class="t-dcl-nopad"></td>
<td><span class="t-mark-rev t-since-c11">(C11 &#36215;)</span></td>
</tr>
<tr class="t-dcl-sep">
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>&#23637;&#24320;&#25104;&#27714;&#20540;&#20026; <code>0</code> &#25110; <code>1</code> &#25110; <code>2</code> &#30340;<a href="c-language-constant_expression.html">&#39044;&#22788;&#29702;&#22120;&#24120;&#37327;&#34920;&#36798;&#24335;</a>&#65292;&#23427;&#25351;&#31034;&#23545;&#24212;<a href="c-atomic.html">&#21407;&#23376;&#31867;&#22411;</a>&#65288;&#26377;&#31526;&#21495;&#21450;&#26080;&#31526;&#21495;&#19968;&#21516;&#65289;&#30340;&#20813;&#38145;&#23646;&#24615;&#12290;</p>
<table class="t-dsc-begin">
<tr class="t-dsc-hitem">
<td>&#20540;</td>
<td>&#35299;&#37322;</td>
</tr>
<tr class="t-dsc">
<td><code>0</code></td>
<td>&#35813;&#21407;&#23376;&#31867;&#22411;&#20915;&#19981;&#20813;&#38145;</td>
</tr>
<tr class="t-dsc">
<td><code>1</code></td>
<td>&#35813;&#21407;&#23376;&#31867;&#22411;&#26377;&#26102;&#20813;&#38145;</td>
</tr>
<tr class="t-dsc">
<td><code>2</code></td>
<td>&#35813;&#21407;&#23376;&#31867;&#22411;&#22987;&#32456;&#20813;&#38145;</td>
</tr>
</table>
<h3><span class="mw-headline" id=".E5.BC.95.E7.94.A8">&#24341;&#29992;</span></h3>
<div class="t-ref-std-11">
<ul>
<li>C11 &#26631;&#20934;&#65288;ISO/IEC 9899:2011&#65289;&#65306;</li>
</ul>
<dl>
<dd>
<ul>
<li>7.17.1/3 atomic lock-free macros (p: 273)</li>
</ul>
</dd>
</dl>
</div>
</div>
<div class="visualClear"></div>
</div>
</div>
</div>
</body>
</html>