aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/docs/html/faq
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2007-12-10 00:38:36 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2007-12-10 00:38:36 +0000
commit79e790677d5a0088d60da607ef0c93c1c06becb5 (patch)
treefd8a2c1f9d4504553b1ef84e02282972137daf4a /libstdc++-v3/docs/html/faq
parent6e2215152b7b92c812177a72de69df442137bf41 (diff)
downloadgcc-79e790677d5a0088d60da607ef0c93c1c06becb5.zip
gcc-79e790677d5a0088d60da607ef0c93c1c06becb5.tar.gz
gcc-79e790677d5a0088d60da607ef0c93c1c06becb5.tar.bz2
howto.html: Update.
2007-12-09 Benjamin Kosnik <bkoz@redhat.com> * docs/html/ext/howto.html: Update. * docs/html/ext/sgiexts.html: Same. * docs/html/ext/concurrence.html: New. Document extensions. * docs/html/17_intro/api.html: Move some bits... * docs/html/17_intro/backwards_compatibility.html: here. New. Add compatibility suggestions, move existing ones. * docs/html/17_intro/howto.html: Update info. * docs/html/18_support/howto.html: Tweak. * docs/html/faq/index.html: Update thread info. * docs/html/documentation.html: Add links. * docs/html/20_util/allocator.html: Update info. * include/precompiled/stdc++.h: Add C++0x includes if appropriate. * testsuite/17_intro/headers/c++200x/all.cc: Same. From-SVN: r130732
Diffstat (limited to 'libstdc++-v3/docs/html/faq')
-rw-r--r--libstdc++-v3/docs/html/faq/index.html20
1 files changed, 16 insertions, 4 deletions
diff --git a/libstdc++-v3/docs/html/faq/index.html b/libstdc++-v3/docs/html/faq/index.html
index e353a1f..ff6cd65 100644
--- a/libstdc++-v3/docs/html/faq/index.html
+++ b/libstdc++-v3/docs/html/faq/index.html
@@ -1052,14 +1052,26 @@ http://clisp.cons.org/~haible/gccinclude-glibc-2.2-compat.diff
<hr />
<h2><a name="5_6">5.6 Is libstdc++ thread-safe?</a></h2>
- <p>libstdc++ strives to be thread-safe when all of the following
+ <p>The library strives to be thread-safe when all of the following
conditions are met:
</p>
<ul>
<li>The system's libc is itself thread-safe,</li>
- <li><code>gcc -v</code> reports a thread model other than 'single',</li>
- <li>[pre-3.3 only] a non-generic implementation of atomicity.h
- exists for the architecture in question.</li>
+ <li>The compiler in use reports a thread model other than 'single'. This can be tested via output from <code>gcc -v</code>. Multi-thread capable versions of gcc output something like this:
+<pre>
+%gcc -v
+Using built-in specs.
+...
+Thread model: posix
+gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
+</pre>
+
+<p>Look for "Thread model" lines that aren't equal to "single."</p>
+ </li>
+ <li>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 <a href="http://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html">Machine Dependent Options</a>.</li>
+ <li>An implementation of atomicity.h functions
+ exists for the architecture in question. See the internals documentation for more <a href="../ext/concurrence.html">details</a>.</li>
+
</ul>
<p>The user-code must guard against concurrent method calls which may
access any particular library object's state. Typically, the