<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>Implementation</title><metaname="generator"content="DocBook XSL-NS Stylesheets V1.78.1"/><metaname="keywords"content="ISO C++, library"/><metaname="keywords"content="ISO C++, library"/><metaname="keywords"content="ISO C++, runtime, library"/><linkrel="home"href="../index.html"title="The GNU C++ Library"/><linkrel="up"href="ext_concurrency.html"title="Chapter30.Concurrency"/><linkrel="prev"href="ext_concurrency.html"title="Chapter30.Concurrency"/><linkrel="next"href="ext_concurrency_use.html"title="Use"/></head><body><divclass="navheader"><tablewidth="100%"summary="Navigation header"><tr><thcolspan="3"align="center">Implementation</th></tr><tr><tdwidth="20%"align="left"><aaccesskey="p"href="ext_concurrency.html">Prev</a></td><thwidth="60%"align="center">Chapter30.Concurrency</th><tdwidth="20%"align="right"><aaccesskey="n"href="ext_concurrency_use.html">Next</a></td></tr></table><hr/></div><divclass="section"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aid="manual.ext.concurrency.impl"></a>Implementation</h2></div></div></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="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
</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem"><p>alpha</p></li><liclass="listitem"><p>ia64</p></li><liclass="listitem"><p>powerpc</p></li><liclass="listitem"><p>s390</p></li></ul></div><p>For others, some form of <codeclass="code">-march</code> may work. On
</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem"><p>cris</p></li><liclass="listitem"><p>hppa</p></li><liclass="listitem"><p>i386</p></li><liclass="listitem"><p>i486</p></li><liclass="listitem"><p>m48k</p></li><liclass="listitem"><p>mips</p></li><liclass="listitem"><p>sparc</p></li></ul></div><p>And for the rest, a simulated atomic lock via pthreads.
</p><p> Detailed information about compiler intrinsics for atomic operations can be found in the GCC <aclass="link"href="http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html"target="_top"> documentation</a>.
</p><p> More details on the library fallbacks from the porting <aclass="link"href="internals.html#internals.thread_safety"title="Thread Safety">section</a>.
</p></div><divclass="section"><divclass="titlepage"><div><div><h3class="title"><aid="manual.ext.concurrency.impl.thread"></a>Thread Abstraction</h3></div></div></div><p>A thin layer above IEEE 1003.1 (i.e. pthreads) is used to abstract
use this layer. More detail as to the specific interface can be found in the source <aclass="link"href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00883_source.html"target="_top">documentation</a>.