Commit f6822be7 by Jonathan Wakely Committed by Jonathan Wakely

Improve docs for --enable-libstdcxx-time=rt

	* doc/xml/manual/configure.xml: Improve documentation of
	--enable-libstdcxx-time option.

From-SVN: r273421
parent a90fe12c
2019-07-11 Jonathan Wakely <jwakely@redhat.com> 2019-07-11 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/configure.xml: Improve documentation of
--enable-libstdcxx-time option.
* include/bits/atomic_base.h (__atomic_impl): New namespace for * include/bits/atomic_base.h (__atomic_impl): New namespace for
wrappers around atomic built-ins. wrappers around atomic built-ins.
(__atomic_float, __atomic_ref): New class templates for use as base (__atomic_float, __atomic_ref): New class templates for use as base
......
...@@ -166,18 +166,24 @@ ...@@ -166,18 +166,24 @@
<varlistentry><term><code>--enable-libstdcxx-time=OPTION</code></term> <varlistentry><term><code>--enable-libstdcxx-time=OPTION</code></term>
<listitem><para>Enables link-type checks for the availability of the <listitem><para>Enables link-type checks for the availability of the
clock_gettime clocks, used in the implementation of [time.clock], <function>clock_gettime</function> clocks, used in the implementation
and of the nanosleep and sched_yield functions, used in the of [time.clock], and of the <function>nanosleep</function> and
<function>sched_yield</function> functions, used in the
implementation of [thread.thread.this] of the 2011 ISO C++ standard. implementation of [thread.thread.this] of the 2011 ISO C++ standard.
The choice OPTION=yes checks for the availability of the facilities The choice OPTION=yes checks for the availability of the facilities
in libc and libposix4. In case it's needed the latter is also linked in libc and libposix4. In case it's needed the latter is also linked
to libstdc++ as part of the build process. OPTION=rt also searches to libstdc++ as part of the build process. OPTION=rt also checks in
(and, if needed, links) librt. Note that the latter is not always librt (and, if it's needed, links to it). Note that linking to librt
desirable because, in glibc, for example, in turn it triggers the is not always desirable because for glibc it requires linking to
linking of libpthread too, which activates locking, a large overhead libpthread too, which causes all reference counting to use atomic
for single-thread programs. OPTION=no skips the tests completely. operations, resulting in a potentially large overhead for
single-threaded programs. OPTION=no skips the tests completely.
The default is OPTION=auto, which skips the checks and enables the The default is OPTION=auto, which skips the checks and enables the
features only for targets known to support them. features only for targets known to support them.
For Linux targets, if <function>clock_gettime</function> is not used
then the [time.clock] implementation will use a system call to access
the realtime and monotonic clocks, which is significantly slower than
the C library's <function>clock_gettime</function> function.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment