concurrency_extensions.xml: Update documentation on atomics.
* doc/xml/manual/concurrency_extensions.xml: Update documentation on atomics. * doc/xml/manual/using.xml: Likewise. Improve markup. * doc/html/*: Regenerate. From-SVN: r222230
This commit is contained in:
parent
8b66a2d43b
commit
9adc2d48ac
|
@ -1,3 +1,10 @@
|
|||
2015-04-20 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* doc/xml/manual/concurrency_extensions.xml: Update documentation
|
||||
on atomics.
|
||||
* doc/xml/manual/using.xml: Likewise. Improve markup.
|
||||
* doc/html/*: Regenerate.
|
||||
|
||||
2015-04-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* scripts/extract_symvers.pl: Ignore elfdump error output.
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
Text <code class="function">modify</code> Up
|
||||
</a></span></dt><dt><span class="section"><a href="manual/policy_based_data_structures_test.html#performance.priority_queue.text_modify_down">
|
||||
Text <code class="function">modify</code> Down
|
||||
</a></span></dt></dl></dd><dt><span class="section"><a href="manual/policy_based_data_structures_test.html#pbds.test.performance.observations">Observations</a></span></dt><dd><dl><dt><span class="section"><a href="manual/policy_based_data_structures_test.html#observations.associative">Associative</a></span></dt><dt><span class="section"><a href="manual/policy_based_data_structures_test.html#observations.priority_queue">Priority_Queue</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="manual/policy_data_structures_ack.html">Acknowledgments</a></span></dt><dt><span class="bibliography"><a href="manual/policy_data_structures.html#pbds.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_containers.html">23. HP/SGI Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_containers.html#manual.ext.containers.sgi">Backwards Compatibility</a></span></dt><dt><span class="section"><a href="manual/ext_sgi.html">Deprecated</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_utilities.html">24. Utilities</a></span></dt><dt><span class="chapter"><a href="manual/ext_algorithms.html">25. Algorithms</a></span></dt><dt><span class="chapter"><a href="manual/ext_numerics.html">26. Numerics</a></span></dt><dt><span class="chapter"><a href="manual/ext_iterators.html">27. Iterators</a></span></dt><dt><span class="chapter"><a href="manual/ext_io.html">28. Input and Output</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_demangling.html">29. Demangling</a></span></dt><dt><span class="chapter"><a href="manual/ext_concurrency.html">30. Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="manual/ext_concurrency_impl.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_concurrency_impl.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="section"><a href="manual/ext_concurrency_impl.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="manual/ext_concurrency_use.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/appendix.html">IV.
|
||||
</a></span></dt></dl></dd><dt><span class="section"><a href="manual/policy_based_data_structures_test.html#pbds.test.performance.observations">Observations</a></span></dt><dd><dl><dt><span class="section"><a href="manual/policy_based_data_structures_test.html#observations.associative">Associative</a></span></dt><dt><span class="section"><a href="manual/policy_based_data_structures_test.html#observations.priority_queue">Priority_Queue</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="manual/policy_data_structures_ack.html">Acknowledgments</a></span></dt><dt><span class="bibliography"><a href="manual/policy_data_structures.html#pbds.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_containers.html">23. HP/SGI Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_containers.html#manual.ext.containers.sgi">Backwards Compatibility</a></span></dt><dt><span class="section"><a href="manual/ext_sgi.html">Deprecated</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_utilities.html">24. Utilities</a></span></dt><dt><span class="chapter"><a href="manual/ext_algorithms.html">25. Algorithms</a></span></dt><dt><span class="chapter"><a href="manual/ext_numerics.html">26. Numerics</a></span></dt><dt><span class="chapter"><a href="manual/ext_iterators.html">27. Iterators</a></span></dt><dt><span class="chapter"><a href="manual/ext_io.html">28. Input and Output</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="manual/ext_demangling.html">29. Demangling</a></span></dt><dt><span class="chapter"><a href="manual/ext_concurrency.html">30. Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="manual/ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="manual/ext_concurrency_impl.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="manual/ext_concurrency_impl.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Built-in Atomic Functions</a></span></dt><dt><span class="section"><a href="manual/ext_concurrency_impl.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="manual/ext_concurrency_use.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="manual/appendix.html">IV.
|
||||
Appendices
|
||||
</a></span></dt><dd><dl><dt><span class="appendix"><a href="manual/appendix_contributing.html">A.
|
||||
Contributing
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 30. Concurrency</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.78.1" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="extensions.html" title="Part III. Extensions" /><link rel="prev" href="ext_demangling.html" title="Chapter 29. Demangling" /><link rel="next" href="ext_concurrency_impl.html" title="Implementation" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 30. Concurrency</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_demangling.html">Prev</a> </td><th width="60%" align="center">Part III.
|
||||
Extensions
|
||||
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="ext_concurrency_impl.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.concurrency"></a>Chapter 30. Concurrency</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_impl.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_use.html">Use</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.design"></a>Design</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.threads"></a>Interface to Locks and Mutexes</h3></div></div></div><p>The file <code class="filename"><ext/concurrence.h></code>
|
||||
</th><td width="20%" align="right"> <a accesskey="n" href="ext_concurrency_impl.html">Next</a></td></tr></table><hr /></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.concurrency"></a>Chapter 30. Concurrency</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_impl.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Built-in Atomic Functions</a></span></dt><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_use.html">Use</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.design"></a>Design</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.design.threads"></a>Interface to Locks and Mutexes</h3></div></div></div><p>The file <code class="filename"><ext/concurrence.h></code>
|
||||
contains all the higher-level
|
||||
constructs for playing with threads. In contrast to the atomics layer,
|
||||
the concurrence layer consists largely of types. All types are defined within <code class="code">namespace __gnu_cxx</code>.
|
||||
|
|
|
@ -1,12 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.78.1" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="ext_concurrency.html" title="Chapter 30. Concurrency" /><link rel="prev" href="ext_concurrency.html" title="Chapter 30. Concurrency" /><link rel="next" href="ext_concurrency_use.html" title="Use" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="ext_concurrency_use.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.atomic_fallbacks"></a>Using Builtin Atomic Functions</h3></div></div></div><p>The functions for atomic operations described above are either
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Implementation</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.78.1" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="ext_concurrency.html" title="Chapter 30. Concurrency" /><link rel="prev" href="ext_concurrency.html" title="Chapter 30. Concurrency" /><link rel="next" href="ext_concurrency_use.html" title="Use" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Implementation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ext_concurrency.html">Prev</a> </td><th width="60%" align="center">Chapter 30. Concurrency</th><td width="20%" align="right"> <a accesskey="n" href="ext_concurrency_use.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.concurrency.impl.atomic_fallbacks"></a>Using Built-in Atomic Functions</h3></div></div></div><p>The functions for atomic operations described above are either
|
||||
implemented via compiler intrinsics (if the underlying host is
|
||||
capable) or by library fallbacks.</p><p>Compiler intrinsics (builtins) are always preferred. However, as
|
||||
the compiler builtins for atomics are not universally implemented,
|
||||
using them directly is problematic, and can result in undefined
|
||||
function calls. (An example of an undefined symbol from the use
|
||||
function calls.
|
||||
</p><p>Prior to GCC 4.7 the older <code class="code">__sync</code> intrinsics were used.
|
||||
An example of an undefined symbol from the use
|
||||
of <code class="code">__sync_fetch_and_add</code> on an unsupported host is a
|
||||
missing reference to <code class="code">__sync_fetch_and_add_4</code>.)
|
||||
missing reference to <code class="code">__sync_fetch_and_add_4</code>.
|
||||
</p><p>Current releases use the newer <code class="code">__atomic</code> intrinsics,
|
||||
which are implemented by library calls if the hardware doesn't support them.
|
||||
Undefined references to functions like
|
||||
<code class="code">__atomic_is_lock_free</code> should be resolved by linking to
|
||||
<code class="filename">libatomic</code>, which is usually
|
||||
installed alongside libstdc++.
|
||||
</p><p>In addition, on some hosts the compiler intrinsics are enabled
|
||||
conditionally, via the <code class="code">-march</code> command line flag. This makes
|
||||
usage vary depending on the target hardware and the flags used during
|
||||
|
|
|
@ -68,4 +68,4 @@
|
|||
Text <code class="function">modify</code> Up
|
||||
</a></span></dt><dt><span class="section"><a href="policy_based_data_structures_test.html#performance.priority_queue.text_modify_down">
|
||||
Text <code class="function">modify</code> Down
|
||||
</a></span></dt></dl></dd><dt><span class="section"><a href="policy_based_data_structures_test.html#pbds.test.performance.observations">Observations</a></span></dt><dd><dl><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.priority_queue">Priority_Queue</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_ack.html">Acknowledgments</a></span></dt><dt><span class="bibliography"><a href="policy_data_structures.html#pbds.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_containers.html">23. HP/SGI Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="ext_containers.html#manual.ext.containers.sgi">Backwards Compatibility</a></span></dt><dt><span class="section"><a href="ext_sgi.html">Deprecated</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">24. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">25. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">26. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">27. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">28. Input and Output</a></span></dt><dd><dl><dt><span class="section"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">29. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">30. Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_impl.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_use.html">Use</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_preface.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
|
||||
</a></span></dt></dl></dd><dt><span class="section"><a href="policy_based_data_structures_test.html#pbds.test.performance.observations">Observations</a></span></dt><dd><dl><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.priority_queue">Priority_Queue</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_ack.html">Acknowledgments</a></span></dt><dt><span class="bibliography"><a href="policy_data_structures.html#pbds.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_containers.html">23. HP/SGI Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="ext_containers.html#manual.ext.containers.sgi">Backwards Compatibility</a></span></dt><dt><span class="section"><a href="ext_sgi.html">Deprecated</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">24. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">25. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">26. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">27. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">28. Input and Output</a></span></dt><dd><dl><dt><span class="section"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">29. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">30. Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_impl.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Built-in Atomic Functions</a></span></dt><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_use.html">Use</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ext_preface.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Interacting with C </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
|
|
@ -108,7 +108,7 @@
|
|||
Text <code class="function">modify</code> Up
|
||||
</a></span></dt><dt><span class="section"><a href="policy_based_data_structures_test.html#performance.priority_queue.text_modify_down">
|
||||
Text <code class="function">modify</code> Down
|
||||
</a></span></dt></dl></dd><dt><span class="section"><a href="policy_based_data_structures_test.html#pbds.test.performance.observations">Observations</a></span></dt><dd><dl><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.priority_queue">Priority_Queue</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_ack.html">Acknowledgments</a></span></dt><dt><span class="bibliography"><a href="policy_data_structures.html#pbds.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_containers.html">23. HP/SGI Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="ext_containers.html#manual.ext.containers.sgi">Backwards Compatibility</a></span></dt><dt><span class="section"><a href="ext_sgi.html">Deprecated</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">24. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">25. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">26. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">27. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">28. Input and Output</a></span></dt><dd><dl><dt><span class="section"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">29. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">30. Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_impl.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_use.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="appendix.html">IV.
|
||||
</a></span></dt></dl></dd><dt><span class="section"><a href="policy_based_data_structures_test.html#pbds.test.performance.observations">Observations</a></span></dt><dd><dl><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.associative">Associative</a></span></dt><dt><span class="section"><a href="policy_based_data_structures_test.html#observations.priority_queue">Priority_Queue</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="policy_data_structures_ack.html">Acknowledgments</a></span></dt><dt><span class="bibliography"><a href="policy_data_structures.html#pbds.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_containers.html">23. HP/SGI Extensions</a></span></dt><dd><dl><dt><span class="section"><a href="ext_containers.html#manual.ext.containers.sgi">Backwards Compatibility</a></span></dt><dt><span class="section"><a href="ext_sgi.html">Deprecated</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">24. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">25. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">26. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">27. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">28. Input and Output</a></span></dt><dd><dl><dt><span class="section"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">29. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">30. Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_impl.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Built-in Atomic Functions</a></span></dt><dt><span class="section"><a href="ext_concurrency_impl.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="ext_concurrency_use.html">Use</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="appendix.html">IV.
|
||||
Appendices
|
||||
</a></span></dt><dd><dl><dt><span class="appendix"><a href="appendix_contributing.html">A.
|
||||
Contributing
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,13 +24,14 @@
|
|||
all required macros to a compilation (if any such flags are
|
||||
required then you must provide the flag for all compilations not
|
||||
just linking) and link-library additions and/or replacements at
|
||||
link time. The documentation is weak. Here is a quick summary
|
||||
to display how ad hoc this is: On Solaris, both -pthreads and
|
||||
-threads (with subtly different meanings) are honored.
|
||||
On GNU/Linux x86, -pthread is honored. On FreeBSD,
|
||||
-pthread is honored. Some other ports use other switches.
|
||||
AFAIK, none of this is properly documented anywhere other than
|
||||
in ``gcc -dumpspecs'' (look at lib and cpp entries).
|
||||
link time. The documentation is weak. On several targets (including
|
||||
GNU/Linux, Solaris and various BSDs) -pthread is honored.
|
||||
Some other ports use other switches.
|
||||
This is not well documented anywhere other than
|
||||
in "gcc -dumpspecs" (look at the 'lib' and 'cpp' entries).
|
||||
</p><p>
|
||||
Some uses of <code class="classname">std::atomic</code> also require linking
|
||||
to <code class="filename">libatomic</code>.
|
||||
</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.concurrency.thread_safety"></a>Thread Safety</h3></div></div></div><p>
|
||||
In the terms of the 2011 C++ standard a thread-safe program is one which
|
||||
does not perform any conflicting non-atomic operations on memory locations
|
||||
|
@ -59,11 +60,16 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
|
|||
Requisite command-line flags are used for atomic operations
|
||||
and threading. Examples of this include <code class="code">-pthread</code>
|
||||
and <code class="code">-march=native</code>, although specifics vary
|
||||
depending on the host environment. See <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html" target="_top">Machine
|
||||
depending on the host environment. See
|
||||
<a class="link" href="using.html#manual.intro.using.flags" title="Command Options">Command Options</a> and
|
||||
<a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html" target="_top">Machine
|
||||
Dependent Options</a>.
|
||||
</p></li><li class="listitem"><p>
|
||||
An implementation of atomicity.h functions
|
||||
exists for the architecture in question. See the internals documentation for more <a class="link" href="internals.html#internals.thread_safety" title="Thread Safety">details</a>.
|
||||
An implementation of the
|
||||
<code class="filename">atomicity.h</code> functions
|
||||
exists for the architecture in question. See the
|
||||
<a class="link" href="internals.html#internals.thread_safety" title="Thread Safety">internals
|
||||
documentation</a> for more details.
|
||||
</p></li></ul></div><p>The user code must guard against concurrent function calls which
|
||||
access any particular library object's state when one or more of
|
||||
those accesses modifies the state. An object will be modified by
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
file <code class="filename">c++config.h</code>, which
|
||||
is generated during the libstdc++ configuration and build
|
||||
process. This file is then included when needed by files part of
|
||||
the public libstdc++ API, like <ios>. Most of these macros
|
||||
should not be used by consumers of libstdc++, and are reserved
|
||||
the public libstdc++ API, like
|
||||
<code class="filename"><ios></code>. Most of these
|
||||
macros should not be used by consumers of libstdc++, and are reserved
|
||||
for internal implementation use. <span class="emphasis"><em>These macros cannot
|
||||
be redefined</em></span>.
|
||||
</p><p>
|
||||
|
@ -18,21 +19,22 @@
|
|||
general public.
|
||||
</p><p>Below is the macro which users may check for library version
|
||||
information. </p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="code">__GLIBCXX__</code></span></dt><dd><p>The current version of
|
||||
libstdc++ in compressed ISO date format, form of an unsigned
|
||||
libstdc++ in compressed ISO date format, as an unsigned
|
||||
long. For details on the value of this particular macro for a
|
||||
particular release, please consult this <a class="link" href="abi.html" title="ABI Policy and Guidelines">
|
||||
document</a>.
|
||||
particular release, please consult the <a class="link" href="abi.html" title="ABI Policy and Guidelines">
|
||||
ABI Policy and Guidelines</a> appendix.
|
||||
</p></dd></dl></div><p>Below are the macros which users may change with #define/#undef or
|
||||
with -D/-U compiler flags. The default state of the symbol is
|
||||
listed.</p><p><span class="quote">“<span class="quote">Configurable</span>”</span> (or <span class="quote">“<span class="quote">Not configurable</span>”</span>) means
|
||||
that the symbol is initially chosen (or not) based on
|
||||
--enable/--disable options at library build and configure time
|
||||
(documented <a class="link" href="configure.html" title="Configure">here</a>), with the
|
||||
various --enable/--disable choices being translated to
|
||||
(documented in
|
||||
<a class="link" href="configure.html" title="Configure">Configure</a>),
|
||||
with the various --enable/--disable choices being translated to
|
||||
#define/#undef).
|
||||
</p><p> <acronym class="acronym">ABI</acronym> means that changing from the default value may
|
||||
mean changing the <acronym class="acronym">ABI</acronym> of compiled code. In other words, these
|
||||
choices control code which has already been compiled (i.e., in a
|
||||
mean changing the <acronym class="acronym">ABI</acronym> of compiled code. In other words,
|
||||
these choices control code which has already been compiled (i.e., in a
|
||||
binary such as libstdc++.a/.so). If you explicitly #define or
|
||||
#undef these macros, the <span class="emphasis"><em>headers</em></span> may see different code
|
||||
paths, but the <span class="emphasis"><em>libraries</em></span> which you link against will not.
|
||||
|
@ -53,19 +55,20 @@
|
|||
<code class="code">--enable-concept-checks</code>. When defined, performs
|
||||
compile-time checking on certain template instantiations to
|
||||
detect violations of the requirements of the standard. This
|
||||
is described in more detail <a class="link" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks">here</a>.
|
||||
is described in more detail in
|
||||
<a class="link" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks">Compile Time Checks</a>.
|
||||
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_DEBUG</code></span></dt><dd><p>
|
||||
Undefined by default. When defined, compiles user code using
|
||||
the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>.
|
||||
the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>.
|
||||
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_DEBUG_PEDANTIC</code></span></dt><dd><p>
|
||||
Undefined by default. When defined while compiling with
|
||||
the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>, makes
|
||||
the debug mode extremely picky by making the use of libstdc++
|
||||
extensions and libstdc++-specific behavior into errors.
|
||||
the <a class="link" href="debug_mode.html" title="Chapter 17. Debug Mode">debug mode</a>, makes
|
||||
the debug mode extremely picky by making the use of libstdc++
|
||||
extensions and libstdc++-specific behavior into errors.
|
||||
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_PARALLEL</code></span></dt><dd><p>Undefined by default. When defined, compiles user code
|
||||
using the <a class="link" href="parallel_mode.html" title="Chapter 18. Parallel Mode">parallel
|
||||
mode</a>.
|
||||
using the <a class="link" href="parallel_mode.html" title="Chapter 18. Parallel Mode">parallel
|
||||
mode</a>.
|
||||
</p></dd><dt><span class="term"><code class="code">_GLIBCXX_PROFILE</code></span></dt><dd><p>Undefined by default. When defined, compiles user code
|
||||
using the <a class="link" href="profile_mode.html" title="Chapter 19. Profile Mode">profile
|
||||
mode</a>.
|
||||
using the <a class="link" href="profile_mode.html" title="Chapter 19. Profile Mode">profile
|
||||
mode</a>.
|
||||
</p></dd></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="using_headers.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="using_namespaces.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Headers </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Namespaces</td></tr></table></div></body></html>
|
|
@ -187,7 +187,7 @@ host hardware and operating system.
|
|||
<section xml:id="manual.ext.concurrency.impl" xreflabel="Implementation"><info><title>Implementation</title></info>
|
||||
<?dbhtml filename="ext_concurrency_impl.html"?>
|
||||
|
||||
<section xml:id="manual.ext.concurrency.impl.atomic_fallbacks" xreflabel="Atomic F"><info><title>Using Builtin Atomic Functions</title></info>
|
||||
<section xml:id="manual.ext.concurrency.impl.atomic_fallbacks" xreflabel="Atomic F"><info><title>Using Built-in Atomic Functions</title></info>
|
||||
|
||||
|
||||
<para>The functions for atomic operations described above are either
|
||||
|
@ -197,9 +197,21 @@ capable) or by library fallbacks.</para>
|
|||
<para>Compiler intrinsics (builtins) are always preferred. However, as
|
||||
the compiler builtins for atomics are not universally implemented,
|
||||
using them directly is problematic, and can result in undefined
|
||||
function calls. (An example of an undefined symbol from the use
|
||||
function calls.
|
||||
</para>
|
||||
|
||||
<para>Prior to GCC 4.7 the older <code>__sync</code> intrinsics were used.
|
||||
An example of an undefined symbol from the use
|
||||
of <code>__sync_fetch_and_add</code> on an unsupported host is a
|
||||
missing reference to <code>__sync_fetch_and_add_4</code>.)
|
||||
missing reference to <code>__sync_fetch_and_add_4</code>.
|
||||
</para>
|
||||
|
||||
<para>Current releases use the newer <code>__atomic</code> intrinsics,
|
||||
which are implemented by library calls if the hardware doesn't support them.
|
||||
Undefined references to functions like
|
||||
<code>__atomic_is_lock_free</code> should be resolved by linking to
|
||||
<filename class="libraryfile">libatomic</filename>, which is usually
|
||||
installed alongside libstdc++.
|
||||
</para>
|
||||
|
||||
<para>In addition, on some hosts the compiler intrinsics are enabled
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
<section xml:id="manual.intro.using.flags" xreflabel="Flags"><info><title>Command Options</title></info>
|
||||
|
||||
<para>
|
||||
The set of features available in the GNU C++ library is shaped
|
||||
by
|
||||
The set of features available in the GNU C++ library is shaped by
|
||||
several <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Invoking-GCC.html">GCC
|
||||
Command Options</link>. Options that impact libstdc++ are
|
||||
enumerated and detailed in the table below.
|
||||
|
@ -64,8 +63,20 @@
|
|||
|
||||
<row>
|
||||
<entry><literal>-pthread</literal> or <literal>-pthreads</literal></entry>
|
||||
<entry>For ISO C++11 <thread>, <future>,
|
||||
<mutex>, or <condition_variable>.</entry>
|
||||
<entry>For ISO C++11
|
||||
<filename class="headerfile"><thread></filename>,
|
||||
<filename class="headerfile"><future></filename>,
|
||||
<filename class="headerfile"><mutex></filename>,
|
||||
or <filename class="headerfile"><condition_variable></filename>.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><literal>-latomic</literal></entry>
|
||||
<entry>Linking to <filename class="libraryfile">libatomic</filename>
|
||||
is required for some uses of ISO C++11
|
||||
<filename class="headerfile"><atomic></filename>.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
|
@ -779,8 +790,9 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
|
|||
file <filename class="headerfile">c++config.h</filename>, which
|
||||
is generated during the libstdc++ configuration and build
|
||||
process. This file is then included when needed by files part of
|
||||
the public libstdc++ API, like <ios>. Most of these macros
|
||||
should not be used by consumers of libstdc++, and are reserved
|
||||
the public libstdc++ API, like
|
||||
<filename class="headerfile"><ios></filename>. Most of these
|
||||
macros should not be used by consumers of libstdc++, and are reserved
|
||||
for internal implementation use. <emphasis>These macros cannot
|
||||
be redefined</emphasis>.
|
||||
</para>
|
||||
|
@ -800,10 +812,10 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
|
|||
<term><code>__GLIBCXX__</code></term>
|
||||
<listitem>
|
||||
<para>The current version of
|
||||
libstdc++ in compressed ISO date format, form of an unsigned
|
||||
libstdc++ in compressed ISO date format, as an unsigned
|
||||
long. For details on the value of this particular macro for a
|
||||
particular release, please consult this <link linkend="appendix.porting.abi">
|
||||
document</link>.
|
||||
particular release, please consult the <link linkend="appendix.porting.abi">
|
||||
ABI Policy and Guidelines</link> appendix.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -816,14 +828,15 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
|
|||
<para><quote>Configurable</quote> (or <quote>Not configurable</quote>) means
|
||||
that the symbol is initially chosen (or not) based on
|
||||
--enable/--disable options at library build and configure time
|
||||
(documented <link linkend="manual.intro.setup.configure">here</link>), with the
|
||||
various --enable/--disable choices being translated to
|
||||
(documented in
|
||||
<link linkend="manual.intro.setup.configure">Configure</link>),
|
||||
with the various --enable/--disable choices being translated to
|
||||
#define/#undef).
|
||||
</para>
|
||||
|
||||
<para> <acronym>ABI</acronym> means that changing from the default value may
|
||||
mean changing the <acronym>ABI</acronym> of compiled code. In other words, these
|
||||
choices control code which has already been compiled (i.e., in a
|
||||
mean changing the <acronym>ABI</acronym> of compiled code. In other words,
|
||||
these choices control code which has already been compiled (i.e., in a
|
||||
binary such as libstdc++.a/.so). If you explicitly #define or
|
||||
#undef these macros, the <emphasis>headers</emphasis> may see different code
|
||||
paths, but the <emphasis>libraries</emphasis> which you link against will not.
|
||||
|
@ -854,7 +867,8 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
|
|||
<code>--enable-concept-checks</code>. When defined, performs
|
||||
compile-time checking on certain template instantiations to
|
||||
detect violations of the requirements of the standard. This
|
||||
is described in more detail <link linkend="manual.ext.compile_checks">here</link>.
|
||||
is described in more detail in
|
||||
<link linkend="manual.ext.compile_checks">Compile Time Checks</link>.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
|
@ -862,31 +876,31 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
|
|||
<listitem>
|
||||
<para>
|
||||
Undefined by default. When defined, compiles user code using
|
||||
the <link linkend="manual.ext.debug_mode">debug mode</link>.
|
||||
the <link linkend="manual.ext.debug_mode">debug mode</link>.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
<varlistentry><term><code>_GLIBCXX_DEBUG_PEDANTIC</code></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Undefined by default. When defined while compiling with
|
||||
the <link linkend="manual.ext.debug_mode">debug mode</link>, makes
|
||||
the debug mode extremely picky by making the use of libstdc++
|
||||
extensions and libstdc++-specific behavior into errors.
|
||||
the <link linkend="manual.ext.debug_mode">debug mode</link>, makes
|
||||
the debug mode extremely picky by making the use of libstdc++
|
||||
extensions and libstdc++-specific behavior into errors.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
<varlistentry><term><code>_GLIBCXX_PARALLEL</code></term>
|
||||
<listitem>
|
||||
<para>Undefined by default. When defined, compiles user code
|
||||
using the <link linkend="manual.ext.parallel_mode">parallel
|
||||
mode</link>.
|
||||
using the <link linkend="manual.ext.parallel_mode">parallel
|
||||
mode</link>.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><code>_GLIBCXX_PROFILE</code></term>
|
||||
<listitem>
|
||||
<para>Undefined by default. When defined, compiles user code
|
||||
using the <link linkend="manual.ext.profile_mode">profile
|
||||
mode</link>.
|
||||
using the <link linkend="manual.ext.profile_mode">profile
|
||||
mode</link>.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
</variablelist>
|
||||
|
@ -1248,13 +1262,16 @@ A quick read of the relevant part of the GCC
|
|||
all required macros to a compilation (if any such flags are
|
||||
required then you must provide the flag for all compilations not
|
||||
just linking) and link-library additions and/or replacements at
|
||||
link time. The documentation is weak. Here is a quick summary
|
||||
to display how ad hoc this is: On Solaris, both -pthreads and
|
||||
-threads (with subtly different meanings) are honored.
|
||||
On GNU/Linux x86, -pthread is honored. On FreeBSD,
|
||||
-pthread is honored. Some other ports use other switches.
|
||||
AFAIK, none of this is properly documented anywhere other than
|
||||
in ``gcc -dumpspecs'' (look at lib and cpp entries).
|
||||
link time. The documentation is weak. On several targets (including
|
||||
GNU/Linux, Solaris and various BSDs) -pthread is honored.
|
||||
Some other ports use other switches.
|
||||
This is not well documented anywhere other than
|
||||
in "gcc -dumpspecs" (look at the 'lib' and 'cpp' entries).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Some uses of <classname>std::atomic</classname> also require linking
|
||||
to <filename class="libraryfile">libatomic</filename>.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
@ -1305,14 +1322,19 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
|
|||
Requisite command-line flags are used for atomic operations
|
||||
and threading. Examples of this include <code>-pthread</code>
|
||||
and <code>-march=native</code>, although specifics vary
|
||||
depending on the host environment. See <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html">Machine
|
||||
depending on the host environment. See
|
||||
<link linkend="manual.intro.using.flags">Command Options</link> and
|
||||
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html">Machine
|
||||
Dependent Options</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
An implementation of atomicity.h functions
|
||||
exists for the architecture in question. See the internals documentation for more <link linkend="internals.thread_safety">details</link>.
|
||||
An implementation of the
|
||||
<filename class="headerfile">atomicity.h</filename> functions
|
||||
exists for the architecture in question. See the
|
||||
<link linkend="internals.thread_safety">internals
|
||||
documentation</link> for more details.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
|
Loading…
Reference in New Issue