aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
Diffstat (limited to 'erts')
-rw-r--r--erts/doc/src/absform.xml18
-rw-r--r--erts/doc/src/alt_dist.xml10
-rw-r--r--erts/doc/src/communication.xml4
-rw-r--r--erts/doc/src/crash_dump.xml10
-rw-r--r--erts/doc/src/driver_entry.xml10
-rw-r--r--erts/doc/src/erl.xml86
-rw-r--r--erts/doc/src/erl_dist_protocol.xml10
-rw-r--r--erts/doc/src/erl_driver.xml20
-rw-r--r--erts/doc/src/erl_ext_dist.xml10
-rw-r--r--erts/doc/src/erl_nif.xml6
-rw-r--r--erts/doc/src/erl_prim_loader.xml14
-rw-r--r--erts/doc/src/erl_tracer.xml2
-rw-r--r--erts/doc/src/erlang.xml94
-rw-r--r--erts/doc/src/erlc.xml6
-rw-r--r--erts/doc/src/erlsrv.xml2
-rw-r--r--erts/doc/src/erts_alloc.xml20
-rw-r--r--erts/doc/src/escript.xml6
-rw-r--r--erts/doc/src/inet_cfg.xml30
-rw-r--r--erts/doc/src/init.xml12
-rw-r--r--erts/doc/src/introduction.xml2
-rw-r--r--erts/doc/src/match_spec.xml14
-rw-r--r--erts/doc/src/notes.xml8
-rw-r--r--erts/doc/src/run_erl.xml2
-rw-r--r--erts/doc/src/start_erl.xml2
-rw-r--r--erts/doc/src/time_correction.xml10
-rw-r--r--erts/emulator/beam/beam_bif_load.c83
-rw-r--r--erts/emulator/beam/beam_emu.c23
-rw-r--r--erts/emulator/beam/erl_alloc.types1
-rw-r--r--erts/emulator/beam/erl_gc.c6
-rw-r--r--erts/emulator/beam/erl_message.c17
-rw-r--r--erts/emulator/beam/erl_message.h11
-rw-r--r--erts/emulator/beam/erl_nif.c14
-rw-r--r--erts/emulator/beam/erl_process.h9
-rw-r--r--erts/emulator/beam/erl_trace.c2
-rw-r--r--erts/emulator/beam/global.h7
-rw-r--r--erts/emulator/beam/utils.c3
-rw-r--r--erts/emulator/sys/common/erl_poll.c14
-rw-r--r--erts/emulator/sys/unix/erl_child_setup.c14
-rw-r--r--erts/emulator/sys/unix/sys.c12
-rw-r--r--erts/emulator/test/hipe_SUITE.erl3
-rw-r--r--erts/include/internal/erl_misc_utils.h29
-rw-r--r--erts/lib_src/pthread/ethr_event.c74
42 files changed, 472 insertions, 258 deletions
diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml
index 174ad9c640..ab00d47425 100644
--- a/erts/doc/src/absform.xml
+++ b/erts/doc/src/absform.xml
@@ -41,21 +41,21 @@
<list type="bulleted">
<item><seealso marker="stdlib:epp">
- <c>stdlib:epp(3)</c></seealso></item>
+ <c>epp(3)</c></seealso></item>
<item><seealso marker="stdlib:erl_eval">
- <c>stdlib:erl_eval(3)</c></seealso></item>
+ <c>erl_eval(3)</c></seealso></item>
<item><seealso marker="stdlib:erl_lint">
- <c>stdlib:erl_lint(3)</c></seealso></item>
+ <c>erl_lint(3)</c></seealso></item>
<item><seealso marker="stdlib:erl_parse">
- <c>sdlib:erl_parse(3)</c></seealso></item>
+ <c>erl_parse(3)</c></seealso></item>
<item><seealso marker="stdlib:erl_pp">
- <c>stdlib:erl_pp(3)</c></seealso></item>
+ <c>erl_pp(3)</c></seealso></item>
<item><seealso marker="stdlib:io">
- <c>stdlib:io(3)</c></seealso></item>
+ <c>io(3)</c></seealso></item>
</list>
<p>The functions are also used as input and output for parse transforms, see
- the <seealso marker="compiler:compile"><c>compiler:compile(3)</c></seealso>
+ the <seealso marker="compiler:compile"><c>compile(3)</c></seealso>
module.</p>
<p>We use the function <c>Rep</c> to denote the mapping from an Erlang source
@@ -177,8 +177,8 @@
<title>Representation of Parse Errors and End-of-File</title>
<p>In addition to the representations of forms, the list that represents
a module declaration (as returned by functions in
- <seealso marker="stdlib:epp"><c>stdlib:epp(3)</c></seealso> and
- <seealso marker="stdlib:erl_parse"><c>sdlib:erl_parse(3)</c></seealso>)
+ <seealso marker="stdlib:epp"><c>epp(3)</c></seealso> and
+ <seealso marker="stdlib:erl_parse"><c>erl_parse(3)</c></seealso>)
can contain the following:</p>
<list type="bulleted">
diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml
index f3e3260230..be969a8267 100644
--- a/erts/doc/src/alt_dist.xml
+++ b/erts/doc/src/alt_dist.xml
@@ -40,7 +40,7 @@
<p>The section is a step-by-step explanation of the
<c><![CDATA[uds_dist]]></c> example application (in the
- <c>Kernel</c> application <c><![CDATA[examples]]></c> directory). The
+ Kernel application <c><![CDATA[examples]]></c> directory). The
<c><![CDATA[uds_dist]]></c> application implements distribution over Unix
domain sockets and is written for the Sun Solaris 2 operating environment.
The mechanisms are however general and apply to any operating system Erlang
@@ -379,15 +379,15 @@
(line 40) can be used to implement an interface similar to
Unix <c><![CDATA[writev]]></c> for output. The Erlang runtime
system could previously not use <c>outputv</c> for the
- distribution, but it can as from <c>ERTS</c> 5.7.2.
- As this driver was written before <c>ERTS</c> 5.7.2 it does
+ distribution, but it can as from ERTS 5.7.2.
+ As this driver was written before ERTS 5.7.2 it does
not use the <c>outputv</c> callback. Using the <c>outputv</c>
callback is preferred, as it reduces copying of data. (We
will however use scatter/gather I/O internally in the driver.)</p>
- <p>As from <c>ERTS</c> 5.5.3 the driver interface was extended with
+ <p>As from ERTS 5.5.3 the driver interface was extended with
version control and the possibility to pass capability information.
- Capability flags are present on line 48. As from <c>ERTS</c> 5.7.4 flag
+ Capability flags are present on line 48. As from ERTS 5.7.4 flag
<seealso marker="driver_entry#driver_flags">
<c>ERL_DRV_FLAG_SOFT_BUSY</c></seealso> is required for drivers that
are to be used by the distribution. The soft busy flag implies that the
diff --git a/erts/doc/src/communication.xml b/erts/doc/src/communication.xml
index 632ca6c212..7e18a73aa8 100644
--- a/erts/doc/src/communication.xml
+++ b/erts/doc/src/communication.xml
@@ -89,9 +89,9 @@
<p>Examples of major implementation changes:</p>
<list type="bulleted">
- <item>As from <c>ERTS</c> 5.5.2 exit signals to processes are truly
+ <item>As from ERTS 5.5.2 exit signals to processes are truly
asynchronously delivered.</item>
- <item>As from <c>ERTS</c> 5.10 all signals from processes to ports
+ <item>As from ERTS 5.10 all signals from processes to ports
are truly asynchronously delivered.</item>
</list>
</section>
diff --git a/erts/doc/src/crash_dump.xml b/erts/doc/src/crash_dump.xml
index d55ab222a7..a9aeb1888c 100644
--- a/erts/doc/src/crash_dump.xml
+++ b/erts/doc/src/crash_dump.xml
@@ -39,7 +39,7 @@
<p>The Erlang crash dump had a major facelift in Erlang/OTP R9C. The
information in this section is therefore not directly applicable for
older dumps. However, if you use <seealso marker="observer:crashdump_viewer">
- <c>observer:crashdump_viewer(3)</c></seealso> on older dumps,
+ <c>crashdump_viewer(3)</c></seealso> on older dumps,
the crash dumps are translated into a format similar to this.</p>
</note>
@@ -57,7 +57,7 @@
cause is external limitations, such as running out of memory. A
crash dump caused by an internal error can be caused by the system
reaching limits in the emulator itself (like the number of atoms
- in the system, or too many simultaneous <c>ets</c> tables). Usually the
+ in the system, or too many simultaneous ETS tables). Usually the
emulator or the operating system can be reconfigured to avoid the
crash, which is why interpreting the crash dump correctly is
important.</p>
@@ -133,7 +133,7 @@ Slogan: &lt;reason&gt;</pre>
&lt;Name&gt;:&lt;Name&gt;/1 <c><![CDATA[|]]></c> No function
&lt;Name&gt;:start/2</em></tag>
<item>
- <p>The <c>Kernel</c>/<c>STDLIB</c> applications are
+ <p>The Kernel/STDLIB applications are
damaged or the start script is damaged.</p>
</item>
<tag><em>Driver_select called with too large file descriptor
@@ -199,7 +199,7 @@ Slogan: &lt;reason&gt;</pre>
are still connected to an application failure. There is much
more information available, so a thorough reading of the
crash dump can reveal the crash reason. The size of processes,
- the number of <c>ets</c> tables, and the Erlang data on each process
+ the number of ETS tables, and the Erlang data on each process
stack can be useful to find the problem.</p>
</section>
@@ -481,7 +481,7 @@ Slogan: &lt;reason&gt;</pre>
<section>
<marker id="ets_tables"></marker>
<title>ETS Tables</title>
- <p>This section contains information about all the <c>ets</c> tables in
+ <p>This section contains information about all the ETS tables in
the system. The following fields are of interest for each table:</p>
<taglist>
diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml
index dea003f091..2421e0a8d9 100644
--- a/erts/doc/src/driver_entry.xml
+++ b/erts/doc/src/driver_entry.xml
@@ -4,7 +4,7 @@
<cref>
<header>
<copyright>
- <year>2001</year><year>2015</year>
+ <year>2001</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -67,7 +67,7 @@
</list>
</warning>
- <p>As from <c>ERTS</c> 5.9 (Erlang/OTP R15B) the driver interface
+ <p>As from ERTS 5.9 (Erlang/OTP R15B) the driver interface
has been changed with larger types for the callbacks
<seealso marker="#output"><c>output</c></seealso>,
<seealso marker="#control"><c>control</c></seealso>, and
@@ -78,7 +78,7 @@
<note>
<p>Old drivers (compiled with an <c>erl_driver.h</c> from an
- <c>ERTS</c> version earlier than 5.9) must be updated and have
+ ERTS version earlier than 5.9) must be updated and have
to use the extended interface (with
<seealso marker="erl_driver#version_management">version management
</seealso>).</p>
@@ -481,7 +481,7 @@ typedef struct erl_drv_entry {
although a driver instance has marked itself as busy (see
<seealso marker="erl_driver#set_busy_port">
<c>erl_driver:set_busy_port</c></seealso>).
- As from <c>ERTS</c> 5.7.4 this flag is required for drivers used
+ As from ERTS 5.7.4 this flag is required for drivers used
by the Erlang distribution (the behavior has always been
required by drivers used by the distribution).</p>
</item>
@@ -558,7 +558,7 @@ typedef struct erl_drv_entry {
<title>See Also</title>
<p><seealso marker="erl_driver"><c>erl_driver(3)</c></seealso>,
<seealso marker="erlang"><c>erlang(3)</c></seealso>,
- <seealso marker="kernel:erl_ddll"><c>kernel:erl_ddll(3)</c></seealso></p>
+ <seealso marker="kernel:erl_ddll"><c>erl_ddll(3)</c></seealso></p>
</section>
</cref>
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 1578d40ef8..f62d3fb170 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -46,7 +46,7 @@
you want to redirect standard input or output.</p>
<note>
- <p>As from <c>ERTS</c> 5.9 (Erlang/OTP R15B) the runtime system does by
+ <p>As from ERTS 5.9 (Erlang/OTP R15B) the runtime system does by
default <em>not</em> bind schedulers to logical processors.
For more information, see system flag
<seealso marker="#+sbt"><c>+sbt</c></seealso>.</p>
@@ -103,7 +103,7 @@
emulator flags. <c><![CDATA[-s my_init]]></c> is an init flag,
interpreted by <c><![CDATA[init]]></c>.
<c><![CDATA[-sname arnie]]></c> is a user flag, stored by
- <c><![CDATA[init]]></c>. It is read by <c>Kernel</c> and causes the
+ <c><![CDATA[init]]></c>. It is read by Kernel and causes the
Erlang runtime system to become distributed. Finally, everything after
<c><![CDATA[-extra]]></c> (that is, <c><![CDATA[+bertie]]></c>) is
considered as plain arguments.</p>
@@ -143,9 +143,9 @@
<p>Sets the application configuration parameter <c><![CDATA[Par]]></c>
to the value <c><![CDATA[Val]]></c> for the application
<c><![CDATA[Application]]></c>; see
- <seealso marker="kernel:app"><c>kernel:app(4)</c></seealso> and
+ <seealso marker="kernel:app"><c>app(4)</c></seealso> and
<seealso marker="kernel:application">
- <c>kernel:application(3)</c></seealso>.</p>
+ <c>application(3)</c></seealso>.</p>
</item>
<tag><marker id="args_file"/><c><![CDATA[-args_file FileName]]></c></tag>
<item>
@@ -192,12 +192,12 @@
<c><![CDATA[Dir]]></c>. Used when applications are installed in
another directory than <c><![CDATA[$ROOT/lib]]></c>; see
<seealso marker="sasl:systools#make_script/1">
- <c>systools:make_script/1,2</c></seealso> in <c>SASL</c>.</p>
+ <c>systools:make_script/1,2</c></seealso> in SASL.</p>
</item>
<tag><c><![CDATA[-code_path_cache]]></c></tag>
<item>
<p>Enables the code path cache of the code server; see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-compile Mod1 Mod2 ...]]></c></tag>
<item>
@@ -212,16 +212,16 @@
<p>Specifies the name of a configuration file,
<c><![CDATA[Config.config]]></c>, which is used to configure
applications; see
- <seealso marker="kernel:app"><c>kernel:app(4)</c></seealso> and
+ <seealso marker="kernel:app"><c>app(4)</c></seealso> and
<seealso marker="kernel:application">
- <c>kernel:application(3)</c></seealso>.</p>
+ <c>application(3)</c></seealso>.</p>
</item>
<tag><marker id="connect_all"/><c><![CDATA[-connect_all false]]></c></tag>
<item>
<p>If this flag is present, <c><![CDATA[global]]></c> does not maintain
a fully connected network of distributed Erlang nodes, and then
global name registration cannot be used; see
- <seealso marker="kernel:global"><c>kernel:global(3)</c></seealso>.</p>
+ <seealso marker="kernel:global"><c>global(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-cookie Cookie]]></c></tag>
<item>
@@ -266,7 +266,7 @@
<item>
<p>Starts heartbeat monitoring of the Erlang runtime system;
see <seealso marker="kernel:heart">
- <c>kernel:heart(3)</c></seealso>.</p>
+ <c>heart(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-hidden]]></c></tag>
<item>
@@ -278,13 +278,13 @@
nodes are part of the result from <c><![CDATA[nodes/0]]></c> on the
other node. See also hidden global groups;
<seealso marker="kernel:global_group">
- <c>kernel:global_group(3)</c></seealso>.</p>
+ <c>global_group(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-hosts Hosts]]></c></tag>
<item>
<p>Specifies the IP addresses for the hosts on which Erlang boot servers
are running, see <seealso marker="kernel:erl_boot_server">
- <c>kernel:erl_boot_server(3)</c></seealso>. This flag
+ <c>erl_boot_server(3)</c></seealso>. This flag
is mandatory if flag <c><![CDATA[-loader inet]]></c> is present.</p>
<p>The IP addresses must be specified in the standard form (four
decimal numbers separated by periods, for example,
@@ -338,7 +338,7 @@
<item>
<p>Makes the Erlang runtime system invoke <c><![CDATA[make:all()]]></c>
in the current working directory and then terminate; see
- <seealso marker="tools:make"><c>tools:make(3)</c></seealso>. Implies
+ <seealso marker="tools:make"><c>make(3)</c></seealso>. Implies
<c><![CDATA[-noinput]]></c>.</p>
</item>
<tag><c><![CDATA[-man Module]]></c></tag>
@@ -351,7 +351,7 @@
<p>Indicates if the system is to load code dynamically
(<c><![CDATA[interactive]]></c>), or if all code is to be loaded
during system initialization (<c><![CDATA[embedded]]></c>); see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.
Defaults to <c><![CDATA[interactive]]></c>.</p>
</item>
<tag><c><![CDATA[-name Name]]></c></tag>
@@ -359,7 +359,7 @@
<p>Makes the Erlang runtime system into a distributed node.
This flag invokes all network servers necessary for a node to
become distributed; see <seealso marker="kernel:net_kernel">
- <c>kernel:net_kernel(3)</c></seealso>. It is also ensured that
+ <c>net_kernel(3)</c></seealso>. It is also ensured that
<c><![CDATA[epmd]]></c> runs on the current host before Erlang is
started; see <seealso marker="epmd"><c>epmd(1)</c></seealso>.and the
<seealso marker="#start_epmd"><c>-start_epmd</c></seealso> option.</p>
@@ -383,7 +383,7 @@
<item>
<p>Disables the sticky directory facility of the Erlang code
server; see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-oldshell]]></c></tag>
<item>
@@ -394,23 +394,23 @@
<item>
<p>Adds the specified directories to the beginning of the code
path, similar to <c><![CDATA[code:add_pathsa/1]]></c>; see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.
As an alternative to <c>-pa</c>, if several directories are
to be prepended to the code path and the directories have a
common parent directory, that parent directory can be
specified in environment variable <c>ERL_LIBS</c>; see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-pz Dir1 Dir2 ...]]></c></tag>
<item>
<p>Adds the specified directories to the end of the code path,
similar to <c><![CDATA[code:add_pathsz/1]]></c>; see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-path Dir1 Dir2 ...]]></c></tag>
<item>
<p>Replaces the path specified in the boot script; see
- <seealso marker="sasl:script"><c>sasl:script(4)</c></seealso>.</p>
+ <seealso marker="sasl:script"><c>script(4)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-proto_dist Proto]]></c></tag>
<item>
@@ -436,7 +436,7 @@
<item>
<p>Specifies an alternative to <c><![CDATA[rsh]]></c> for starting a
slave node on a remote host; see
- <seealso marker="stdlib:slave"><c>stdlib:slave(3)</c></seealso>.</p>
+ <seealso marker="stdlib:slave"><c>slave(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[-run Mod [Func [Arg1, Arg2, ...]]]]></c> (init
flag)</tag>
@@ -612,11 +612,11 @@
</item>
<tag><marker id="+e"/><c><![CDATA[+e Number]]></c></tag>
<item>
- <p>Sets the maximum number of <c>ets</c> tables.</p>
+ <p>Sets the maximum number of ETS tables.</p>
</item>
<tag><c><![CDATA[+ec]]></c></tag>
<item>
- <p>Forces option <c>compressed</c> on all <c>ets</c> tables.
+ <p>Forces option <c>compressed</c> on all ETS tables.
Only intended for test and evaluation.</p>
</item>
<tag><marker id="file_name_encoding"></marker>
@@ -627,11 +627,11 @@
code points &gt; 255.</p>
<p>For more information about Unicode filenames, see section
<seealso marker="stdlib:unicode_usage#unicode_file_names">Unicode
- Filenames</seealso> in the <c>STDLIB</c> User's Guide. Notice that
+ Filenames</seealso> in the STDLIB User's Guide. Notice that
this value also applies to command-line parameters and environment
variables (see section <seealso
marker="stdlib:unicode_usage#unicode_in_environment_and_parameters">
- Unicode in Enviroment and Parameters</seealso> in the <c>STDLIB</c>
+ Unicode in Enviroment and Parameters</seealso> in the STDLIB
User's Guide).</p>
</item>
<tag><c><![CDATA[+fnu[{w|i|e}]]]></c></tag>
@@ -663,11 +663,11 @@
points to an invalid filename.</p>
<p>For more information about Unicode filenames, see section
<seealso marker="stdlib:unicode_usage#unicode_file_names">Unicode
- Filenames</seealso> in the <c>STDLIB</c> User's Guide. Notice that
+ Filenames</seealso> in the STDLIB User's Guide. Notice that
this value also applies to command-line parameters and environment
variables (see section <seealso
marker="stdlib:unicode_usage#unicode_in_environment_and_parameters">
- Unicode in Enviroment and Parameters</seealso> in the <c>STDLIB</c>
+ Unicode in Enviroment and Parameters</seealso> in the STDLIB
User's Guide).</p>
</item>
<tag><c><![CDATA[+fna[{w|i|e}]]]></c></tag>
@@ -684,11 +684,11 @@
selected, then <c>w</c>, <c>i</c>, or <c>e</c> have no effect.</p>
<p>For more information about Unicode filenames, see section
<seealso marker="stdlib:unicode_usage#unicode_file_names">Unicode
- Filenames</seealso> in the <c>STDLIB</c> User's Guide. Notice that
+ Filenames</seealso> in the STDLIB User's Guide. Notice that
this value also applies to command-line parameters and environment
variables (see section <seealso
marker="stdlib:unicode_usage#unicode_in_environment_and_parameters">
- Unicode in Enviroment and Parameters</seealso> in the <c>STDLIB</c>
+ Unicode in Enviroment and Parameters</seealso> in the STDLIB
User's Guide).</p>
</item>
<tag><c><![CDATA[+hms Size]]></c></tag>
@@ -783,7 +783,7 @@
example, your font does not cover all Unicode characters.</item>
</taglist>
<p>See also <seealso marker="stdlib:io#printable_range/0">
- <c>io:printable_range/0</c></seealso> in <c>STDLIB</c>.</p>
+ <c>io:printable_range/0</c></seealso> in STDLIB.</p>
</item>
<tag><marker id="+P"/><marker id="max_processes"/><c><![CDATA[+P Number]]></c></tag>
<item>
@@ -838,7 +838,7 @@
</item>
<tag><c><![CDATA[+r]]></c></tag>
<item>
- <p>Forces <c>ets</c> memory block to be moved on realloc.</p>
+ <p>Forces ETS memory block to be moved on realloc.</p>
</item>
<tag><marker id="+rg"/><c><![CDATA[+rg ReaderGroupsLimit]]></c></tag>
<item>
@@ -1268,7 +1268,7 @@
<item>
<p>Enables or disables eager check I/O scheduling. Defaults
to <c>true</c>. The default was changed from <c>false</c>
- as from <c>ERTS</c> 7.0. The behavior before this
+ as from ERTS 7.0. The behavior before this
flag was introduced corresponds to <c>+secio false</c>.</p>
<p>The flag effects when schedulers will check for I/O
operations possible to execute, and when such I/O operations
@@ -1365,7 +1365,7 @@
<tag><marker id="+sws"/><c>+sws default|legacy</c></tag>
<item>
<p>Sets scheduler wakeup strategy. Default strategy changed in
- <c>ERTS</c> 5.10 (Erlang/OTP R16A). This strategy was known as
+ ERTS 5.10 (Erlang/OTP R16A). This strategy was known as
<c>proposal</c> in Erlang/OTP R15. The <c>legacy</c> strategy
was used as default from R13 up to and including R15.</p>
<note>
@@ -1446,7 +1446,7 @@
The current mapping can be retrieved using
<c><![CDATA[error_logger:warning_map/0]]></c>. For more information,
see <seealso marker="kernel:error_logger#warning_map/0">
- <c>error_logger:warning_map/0</c></seealso> in <c>Kernel</c>.</p>
+ <c>error_logger:warning_map/0</c></seealso> in Kernel.</p>
</item>
<tag><c><![CDATA[+zFlag Value]]></c></tag>
<item>
@@ -1515,7 +1515,7 @@
<c><![CDATA[ERL_CRASH_DUMP_SECONDS=-1]]></c>, the runtime system
waits indefinitely for the crash dump file to be written.</p>
<p>This variable is used with <seealso marker="kernel:heart">
- <c>kernel:heart(3)</c></seealso> if <c>heart</c> is running:</p>
+ <c>heart(3)</c></seealso> if <c>heart</c> is running:</p>
<taglist>
<tag><c><![CDATA[ERL_CRASH_DUMP_SECONDS=0]]></c></tag>
<item>Suppresses the writing a crash dump file entirely, thus
@@ -1558,7 +1558,7 @@
<item>
<p>Contains a list of additional library directories that the code
server searches for applications and adds to the code path; see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</item>
<tag><c><![CDATA[ERL_EPMD_ADDRESS]]></c></tag>
<item>
@@ -1631,14 +1631,14 @@ code:load_abs("..../user_default"). ]]></code>
<seealso marker="erts_alloc"><c>erts_alloc(3)</c></seealso>,
<seealso marker="init"><c>init(3)</c></seealso>,
<seealso marker="kernel:application">
- <c>kernel:application(3)</c></seealso>,
- <seealso marker="kernel:auth"><c>kernel:auth(3)</c></seealso>,
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>,
+ <c>application(3)</c></seealso>,
+ <seealso marker="kernel:auth"><c>auth(3)</c></seealso>,
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>,
<seealso marker="kernel:erl_boot_server">
- <c>kernel:erl_boot_server(3)</c></seealso>,
- <seealso marker="kernel:heart"><c>kernel:heart(3)</c></seealso>,
- <seealso marker="kernel:net_kernel"><c>kernel:net_kernel(3)</c></seealso>,
- <seealso marker="tools:make"><c>tools:make(3)</c></seealso></p>
+ <c>erl_boot_server(3)</c></seealso>,
+ <seealso marker="kernel:heart"><c>heart(3)</c></seealso>,
+ <seealso marker="kernel:net_kernel"><c>net_kernel(3)</c></seealso>,
+ <seealso marker="tools:make"><c>make(3)</c></seealso></p>
</section>
</comref>
diff --git a/erts/doc/src/erl_dist_protocol.xml b/erts/doc/src/erl_dist_protocol.xml
index a5949ce15f..ee74983730 100644
--- a/erts/doc/src/erl_dist_protocol.xml
+++ b/erts/doc/src/erl_dist_protocol.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2007</year>
- <year>2015</year>
+ <year>2016</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -48,7 +48,7 @@
</item>
<item>
<p>Authentication (done by <seealso marker="kernel:net_kernel">
- <c>kernel:net_kernel(3)</c></seealso>) (3)</p>
+ <c>net_kernel(3)</c></seealso>) (3)</p>
</item>
<item>
<p>Connected (4)</p>
@@ -573,7 +573,7 @@ io:format("old/unused name ~ts at port ~p, fd = ~p ~n",
<p>Every message in the handshake starts with a 16-bit big-endian integer,
which contains the message length (not counting the two initial bytes).
In Erlang this corresponds to option <c>{packet, 2}</c> in
- <seealso marker="kernel:gen_tcp"><c>kernel:gen_tcp(3)</c></seealso>.
+ <seealso marker="kernel:gen_tcp"><c>gen_tcp(3)</c></seealso>.
Notice that after the handshake, the distribution switches to 4 byte
packet headers.</p>
</section>
@@ -825,7 +825,7 @@ DiB == gen_digest(ChA, ICA)?
<section>
<marker id="connected_nodes"/>
<title>Protocol between Connected Nodes</title>
- <p>As from <c>ERTS</c> 5.7.2 the runtime system passes a distribution flag
+ <p>As from ERTS 5.7.2 the runtime system passes a distribution flag
in the handshake stage that enables the use of a
<seealso marker="erl_ext_dist#distribution_header">distribution header
</seealso> on all messages passed. Messages passed between nodes have in
@@ -869,7 +869,7 @@ DiB == gen_digest(ChA, ICA)?
number is omitted from the terms that follow a distribution header
</seealso>.</p>
- <p>Nodes with an <c>ERTS</c> version earlier than 5.7.2 does not pass the
+ <p>Nodes with an ERTS version earlier than 5.7.2 does not pass the
distribution flag that enables the distribution header. Messages passed
between nodes have in this case the following format:</p>
diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml
index 8e83b74986..836a58a676 100644
--- a/erts/doc/src/erl_driver.xml
+++ b/erts/doc/src/erl_driver.xml
@@ -71,7 +71,7 @@
</list>
</warning>
- <p>As from <c>ERTS</c> 5.5.3 the driver interface has been extended
+ <p>As from ERTS 5.5.3 the driver interface has been extended
(see <seealso marker="driver_entry#extended_marker">
<c>extended marker</c></seealso>). The extended interface introduces
<seealso marker="#version_management">version management</seealso>,
@@ -81,7 +81,7 @@
initialization, and some new driver API functions.</p>
<note>
- <p>As from <c>ERTS</c> 5.9 old drivers must be recompiled
+ <p>As from ERTS 5.9 old drivers must be recompiled
and use the extended interface. They must also be adjusted to the
<seealso marker="#rewrites_for_64_bits">
64-bit capable driver interface</seealso>.</p>
@@ -406,7 +406,7 @@
<section>
<marker id="rewrites_for_64_bits"/>
<title>Rewrites for 64-Bit Driver Interface</title>
- <p><c>ERTS</c> 5.9 introduced two new integer types,
+ <p>ERTS 5.9 introduced two new integer types,
<seealso marker="#ErlDrvSizeT"><c>ErlDrvSizeT</c></seealso> and
<seealso marker="#ErlDrvSSizeT"><c>ErlDrvSSizeT</c></seealso>,
which can hold 64-bit sizes if necessary.</p>
@@ -423,7 +423,7 @@
to get better warnings. Try to find a similar flag if you use
another compiler.</p>
- <p>The following is a checklist for rewriting a pre <c>ERTS</c> 5.9 driver,
+ <p>The following is a checklist for rewriting a pre ERTS 5.9 driver,
most important first:</p>
<taglist>
@@ -717,7 +717,7 @@ typedef struct ErlDrvBinary {
<p>Notice that as a driver binary is shared by the driver and
the emulator. A binary received from the emulator or sent to
the emulator must not be changed by the driver.</p>
- <p>Since <c>ERTS</c> 5.5 (Erlang/OTP R11B), <c>orig_bytes</c> is
+ <p>Since ERTS 5.5 (Erlang/OTP R11B), <c>orig_bytes</c> is
guaranteed to be properly aligned for storage of an array of
doubles (usually 8-byte aligned).</p>
</item>
@@ -1058,7 +1058,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]></code>
<p>The return value is <c>-1</c> if the <c>driver_async</c> call
fails.</p>
<note>
- <p>As from <c>ERTS</c> 5.5.4.3 the default stack size for
+ <p>As from ERTS 5.5.4.3 the default stack size for
threads in the async-thread pool is 16 kilowords,
that is, 64 kilobyte on 32-bit architectures.
This small default size has been chosen because the
@@ -2534,11 +2534,11 @@ ERL_DRV_MAP int sz</pre>
<p>The unsigned integer data type <c>ErlDrvUInt</c> and the
signed integer data type <c>ErlDrvSInt</c> are 64 bits wide
on a 64-bit runtime system and 32 bits wide on a 32-bit
- runtime system. They were introduced in <c>ERTS</c> 5.6
+ runtime system. They were introduced in ERTS 5.6
and replaced some of the <c>int</c> arguments in the list above.</p>
<p>The unsigned integer data type <c>ErlDrvUInt64</c> and the
signed integer data type <c>ErlDrvSInt64</c> are always 64 bits
- wide. They were introduced in <c>ERTS</c> 5.7.4.</p>
+ wide. They were introduced in ERTS 5.7.4.</p>
<p>To build the tuple <c>{tcp, Port, [100 | Binary]}</c>, the
following call can be made.</p>
<code type="none"><![CDATA[
@@ -2630,7 +2630,7 @@ erl_drv_output_term(driver_mk_port(drvport), spec, sizeof(spec) / sizeof(spec[0]
<c>ERL_DRV_BINARY</c> and the <c>ErlDrvBinary</c> in question.</p>
<p>The <c>ERL_DRV_UINT</c>, <c>ERL_DRV_BUF2BINARY</c>, and
<c>ERL_DRV_EXT2TERM</c> term types were introduced in
- <c>ERTS</c> 5.6.</p>
+ ERTS 5.6.</p>
<p>This function is only thread-safe when the emulator with SMP
support is used.</p>
</desc>
@@ -3213,7 +3213,7 @@ erl_drv_output_term(driver_mk_port(drvport), spec, sizeof(spec) / sizeof(spec[0]
<title>See Also</title>
<p><seealso marker="driver_entry"><c>driver_entry(3)</c></seealso>,
<seealso marker="erlang"><c>erlang(3)</c></seealso>,
- <seealso marker="kernel:erl_ddll"><c>kernel:erl_ddll(3)</c></seealso>,
+ <seealso marker="kernel:erl_ddll"><c>erl_ddll(3)</c></seealso>,
section <seealso marker="alt_dist">How to Implement an Alternative
Carrier for the Erlang Distribution></seealso> in the User's Guide</p>
</section>
diff --git a/erts/doc/src/erl_ext_dist.xml b/erts/doc/src/erl_ext_dist.xml
index fed41098f8..4f799f8f34 100644
--- a/erts/doc/src/erl_ext_dist.xml
+++ b/erts/doc/src/erl_ext_dist.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2007</year>
- <year>2015</year>
+ <year>2016</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -119,7 +119,7 @@
<tcaption>Compressed Data Format when Expanded</tcaption></table>
<marker id="utf8_atoms"/>
<note>
- <p>As from <c>ERTS</c> 5.10 (OTP R16) support
+ <p>As from ERTS 5.10 (OTP R16) support
for UTF-8 encoded atoms has been introduced in the external format.
However, only characters that can be encoded using Latin-1 (ISO-8859-1)
are currently supported in atoms. The support for UTF-8 encoded atoms
@@ -149,9 +149,9 @@
<title>Distribution Header</title>
<p>
<marker id="distribution_header"/>
- As from <c>ERTS</c> 5.7.2 the old atom cache protocol was
+ As from ERTS 5.7.2 the old atom cache protocol was
dropped and a new one was introduced. This protocol
- introduced the distribution header. Nodes with an <c>ERTS</c> version
+ introduced the distribution header. Nodes with an ERTS version
earlier than 5.7.2 can still communicate with new nodes,
but no distribution header and no atom cache are used.</p>
<p>
@@ -799,7 +799,7 @@
</p>
<note>
<p>
- <c>SMALL_ATOM_EXT</c> was introduced in <c>ERTS</c> 5.7.2 and
+ <c>SMALL_ATOM_EXT</c> was introduced in ERTS 5.7.2 and
require an exchange of distribution flag
<seealso marker="erl_dist_protocol#dflags">
<c>DFLAG_SMALL_ATOM_TAGS</c></seealso> in the
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 4ec5ab78d8..b5dc9037c4 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -474,7 +474,7 @@ return term;</code>
register/unregister its name, and so on.</p>
<p>Termination of a process executing a dirty NIF can only be
completed up to a certain point while it executes the dirty NIF.
- All Erlang resources, such as its registered name and its <c>ets</c>
+ All Erlang resources, such as its registered name and its ETS
tables, are released. All links and monitors are triggered. The
execution of the NIF is, however, <em>not</em> stopped. The NIF
can safely continue execution, allocate heap memory, and so on,
@@ -1573,7 +1573,7 @@ typedef enum {
<seealso marker="#enif_raise_exception">
<c>enif_raise_exception</c></seealso>.</p>
<note>
- <p>Before <c>ERTS</c> 7.0 (Erlang/OTP 18), the return value
+ <p>Before ERTS 7.0 (Erlang/OTP 18), the return value
from <c>enif_make_badarg</c> had to be returned from the NIF. This
requirement is now lifted as the return value from the NIF is
ignored if <c>enif_make_badarg</c> has been invoked.</p>
@@ -2561,7 +2561,7 @@ enif_map_iterator_destroy(env, &amp;iter);</code>
thread.</p>
<note>
<p>Passing <c>msg_env</c> as <c>NULL</c> is only supported as from
- <c>ERTS</c> 8.0 (Erlang/OTP 19).</p>
+ ERTS 8.0 (Erlang/OTP 19).</p>
</note>
</desc>
</func>
diff --git a/erts/doc/src/erl_prim_loader.xml b/erts/doc/src/erl_prim_loader.xml
index 86a3b98eda..286bac6c93 100644
--- a/erts/doc/src/erl_prim_loader.xml
+++ b/erts/doc/src/erl_prim_loader.xml
@@ -60,7 +60,7 @@
for example,
<c>$OTPROOT/lib/</c><c>mnesia-4.4.7.ez/mnesia-4.4.7/ebin/</c><c>mnesia.beam</c>.
For information about archive files, see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</desc>
</func>
@@ -87,7 +87,7 @@
for example,
<c>$OTPROOT/lib/</c><c>mnesia-4.4.7.ez/mnesia-4.4.7/ebin</c>.
For information about archive files, see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</desc>
</func>
@@ -98,18 +98,18 @@
<p>Retrieves information about a file. Returns
<c>{ok, <anno>FileInfo</anno>}</c> if successful, otherwise
<c>error</c>. <c><anno>FileInfo</anno></c> is a record
- <c>file_info</c>, defined in the <c>Kernel</c> include file
+ <c>file_info</c>, defined in the Kernel include file
<c>file.hrl</c>. Include the following directive in the module
from which the function is called:</p>
<code type="none">
-include_lib("kernel/include/file.hrl").</code>
<p>For more information about the record <c>file_info</c>, see
- <seealso marker="kernel:file"><c>kernel:file(3)</c></seealso>.</p>
+ <seealso marker="kernel:file"><c>file(3)</c></seealso>.</p>
<p><c><anno>Filename</anno></c> can also be a file in an archive,
for example,
<c>$OTPROOT/lib/</c><c>mnesia-4.4.7.ez/mnesia-4.4.7/ebin/</c><c>mnesia</c>.
For information about archive files, see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</desc>
</func>
@@ -167,7 +167,7 @@
can use. This flag is mandatory if flag <c>-loader inet</c>
is present. On each host, there must be on Erlang node
with the <seealso marker="kernel:erl_boot_server">
- <c>kernel:erl_boot_server(3)</c></seealso>,
+ <c>erl_boot_server(3)</c></seealso>,
which handles the load requests.
<c>Hosts</c> is a list of IP addresses (hostnames
are not acceptable).</p>
@@ -184,7 +184,7 @@
<title>See Also</title>
<p><seealso marker="init"><c>init(3)</c></seealso>,
<seealso marker="kernel:erl_boot_server">
- <c>kernel:erl_boot_server(3)</c></seealso></p>
+ <c>erl_boot_server(3)</c></seealso></p>
</section>
</erlref>
diff --git a/erts/doc/src/erl_tracer.xml b/erts/doc/src/erl_tracer.xml
index 131157eef8..83eef374ca 100644
--- a/erts/doc/src/erl_tracer.xml
+++ b/erts/doc/src/erl_tracer.xml
@@ -434,7 +434,7 @@
specified.</p>
<p>For more information on what <c>Label</c> and <c>SeqTraceInfo</c>
can be, see <seealso marker="kernel:seq_trace">
- <c>kernel:seq_trace(3)</c></seealso>.</p>
+ <c>seq_trace(3)</c></seealso>.</p>
</desc>
</func>
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index d5eae2d66d..d0a3a77e43 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -377,7 +377,7 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code>
2> binary_part(Bin,{0,2}).
&lt;&lt;1,2&gt;&gt;</code>
<p>For details about the <c><anno>PosLen</anno></c> semantics, see
- <seealso marker="stdlib:binary"><c>stdlib:binary(3)</c></seealso>.</p>
+ <seealso marker="stdlib:binary"><c>binary(3)</c></seealso>.</p>
<p>Allowed in guard tests.</p>
</desc>
</func>
@@ -504,7 +504,7 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code>
this function is deprecated.</em> New code is to use
<seealso marker="stdlib:binary#bin_to_list/3">
<c>binary:bin_to_list/3</c></seealso>
- in <c>STDLIB</c> instead. All functions in module
+ in STDLIB instead. All functions in module
<c>binary</c> consistently use zero-based indexing.</p>
</note>
</desc>
@@ -724,7 +724,7 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code>
<p>Returns <c>true</c> if <c><anno>Module</anno></c> has old code,
otherwise <c>false</c>.</p>
<p>See also <seealso marker="kernel:code">
- <c>kernel:code(3)</c></seealso>.</p>
+ <c>code(3)</c></seealso>.</p>
</desc>
</func>
@@ -825,7 +825,7 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code>
</p>
</note>
<p>See also <seealso marker="kernel:code">
- <c>kernel:code(3)</c></seealso>.</p>
+ <c>code(3)</c></seealso>.</p>
<p>Failures:</p>
<taglist>
<tag><c>badarg</c></tag>
@@ -1051,7 +1051,7 @@ Z = erlang:crc32_combine(X,Y,iolist_size(Data2)).</code>
otherwise <c>true</c>.</p>
<warning>
<p>This BIF is intended for the code server (see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>)
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>)
and is not to be used elsewhere.</p>
</warning>
<p>Failure: <c>badarg</c> if there already is an old version of
@@ -2519,7 +2519,7 @@ os_prompt%</pre>
</taglist>
<warning>
<p>This BIF is intended for the code server (see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>)
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>)
and is not to be used elsewhere.</p>
</warning>
</desc>
@@ -2584,7 +2584,7 @@ os_prompt%</pre>
<p>Returns a list of all loaded Erlang modules (current and
old code), including preloaded modules.</p>
<p>See also <seealso marker="kernel:code">
- <c>kernel:code(3)</c></seealso>.</p>
+ <c>code(3)</c></seealso>.</p>
</desc>
</func>
@@ -2864,7 +2864,7 @@ os_prompt%</pre>
</item>
<tag><c>ets</c></tag>
<item>
- <p>The total amount of memory currently allocated for <c>ets</c>
+ <p>The total amount of memory currently allocated for ETS
tables. This memory is part of the memory presented as
<c>system</c> memory.</p>
</item>
@@ -2885,7 +2885,7 @@ os_prompt%</pre>
<p>For information on how to run the emulator with
instrumentation, see
<seealso marker="tools:instrument">
- <c>tools:instrument(3)</c></seealso>
+ <c>instrument(3)</c></seealso>
and/or <seealso marker="erl"><c>erl(1)</c></seealso>.</p>
</item>
</taglist>
@@ -2933,7 +2933,7 @@ RealSystem = system + MissedSystem</code>
memory blocks.</p>
</note>
<note>
- <p>As from <c>ERTS</c> 5.6.4, <c>erlang:memory/0</c> requires that
+ <p>As from ERTS 5.6.4, <c>erlang:memory/0</c> requires that
all <seealso marker="erts:erts_alloc"><c>erts_alloc(3)</c></seealso>
allocators are enabled (default behavior).</p>
</note>
@@ -2954,7 +2954,7 @@ RealSystem = system + MissedSystem</code>
of <c>memory_type()</c> atoms, in which case a corresponding list of
<c>{memory_type(), Size :: integer >= 0}</c> tuples is returned.</p>
<note>
- <p>As from <c>ERTS</c> 5.6.4,
+ <p>As from ERTS 5.6.4,
<c>erlang:memory/1</c> requires that
all <seealso marker="erts_alloc"><c>erts_alloc(3)</c></seealso>
allocators are enabled (default behavior).</p>
@@ -3002,7 +3002,7 @@ RealSystem = system + MissedSystem</code>
the module.</p>
<warning>
<p>This BIF is intended for the code server (see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>)
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>)
and is not to be used elsewhere.</p>
</warning>
</desc>
@@ -3225,13 +3225,13 @@ RealSystem = system + MissedSystem</code>
time-out for the <em>monitored node</em> to connect itself,
even if it cannot be actively connected from this node
(that is, it is blocked). The state where this can be useful
- can only be achieved by using the <c>Kernel</c> option
+ can only be achieved by using the Kernel option
<c>dist_auto_connect once</c>. If that option is not
used, option <c>allow_passive_connect</c> has no effect.</p>
<note>
<p>Option <c>allow_passive_connect</c> is used
internally and is seldom needed in applications where the
- network topology and the <c>Kernel</c> options in effect
+ network topology and the Kernel options in effect
are known in advance.</p>
</note>
<p>Failure: <c>badarg</c> if the local node is not alive or the
@@ -3297,9 +3297,9 @@ RealSystem = system + MissedSystem</code>
<desc>
<p>Works exactly like
<seealso marker="#error/1"><c>error/1</c></seealso>, but
- <c>Dialyzer</c> thinks that this BIF will return an arbitrary
+ Dialyzer thinks that this BIF will return an arbitrary
term. When used in a stub function for a NIF to generate an
- exception when the NIF library is not loaded, <c>Dialyzer</c>
+ exception when the NIF library is not loaded, Dialyzer
does not generate false warnings.</p>
</desc>
</func>
@@ -3310,9 +3310,9 @@ RealSystem = system + MissedSystem</code>
<desc>
<p>Works exactly like
<seealso marker="#error/2"><c>error/2</c></seealso>, but
- <c>Dialyzer</c> thinks that this BIF will return an arbitrary
+ Dialyzer thinks that this BIF will return an arbitrary
term. When used in a stub function for a NIF to generate an
- exception when the NIF library is not loaded, <c>Dialyzer</c>
+ exception when the NIF library is not loaded, Dialyzer
does not generate false warnings.</p>
</desc>
</func>
@@ -3435,9 +3435,9 @@ RealSystem = system + MissedSystem</code>
translation or to force, for example UTF-8, supply the executable
and/or arguments as a binary in the correct
encoding. For details, see the module
- <seealso marker="kernel:file"><c>kernel:file(3)</c></seealso>, the
+ <seealso marker="kernel:file"><c>file(3)</c></seealso>, the
function <seealso marker="kernel:file#native_name_encoding/0">
- <c>file:native_name_encoding/0</c></seealso> in <c>Kernel</c>, and
+ <c>file:native_name_encoding/0</c></seealso> in Kernel, and
the <seealso marker="stdlib:unicode_usage">
<c>Using Unicode in Erlang</c></seealso> User's Guide.</p>
<note>
@@ -3749,7 +3749,7 @@ RealSystem = system + MissedSystem</code>
the owning process using signals of the form
<c>{'EXIT', Port, PosixCode}</c>. For the possible values of
<c>PosixCode</c>, see
- <seealso marker="kernel:file"><c>kernel:file(3)</c></seealso>.</p>
+ <seealso marker="kernel:file"><c>file(3)</c></seealso>.</p>
<p>The maximum number of ports that can be open at the same
time can be configured by passing command-line flag
<seealso marker="erl#max_ports"><c>+Q</c></seealso> to
@@ -3764,7 +3764,7 @@ RealSystem = system + MissedSystem</code>
<desc>
<p>Portable hash function that gives the same hash for
the same Erlang term regardless of machine architecture and
- <c>ERTS</c> version (the BIF was introduced in <c>ERTS</c> 4.9.1.1).
+ ERTS version (the BIF was introduced in ERTS 4.9.1.1).
The function returns a hash value for
<c><anno>Term</anno></c> within the range
<c>1..<anno>Range</anno></c>. The maximum value for
@@ -3784,7 +3784,7 @@ RealSystem = system + MissedSystem</code>
<desc>
<p>Portable hash function that gives the same hash for
the same Erlang term regardless of machine architecture and
- <c>ERTS</c> version (the BIF was introduced in <c>ERTS</c> 5.2).
+ ERTS version (the BIF was introduced in ERTS 5.2).
The function returns a hash value for
<c><anno>Term</anno></c> within the range
<c>0..<anno>Range</anno>-1</c>. The maximum value for
@@ -4347,7 +4347,7 @@ RealSystem = system + MissedSystem</code>
<fsummary>Information about the queue size of a port.</fsummary>
<desc>
<p><c><anno>Bytes</anno></c> is the total number
- of bytes queued by the port using the <c>ERTS</c> driver queue
+ of bytes queued by the port using the ERTS driver queue
implementation.</p>
<p>If the port identified by <c><anno>Port</anno></c> is not open,
<c>undefined</c> is returned. If the port is closed and the
@@ -4455,12 +4455,12 @@ RealSystem = system + MissedSystem</code>
</desc>
</func>
- <marker id="process_flag_min_heap_size"/>
<func>
<name name="process_flag" arity="2" clause_i="3"/>
<fsummary>Set process flag min_heap_size for the calling process.
</fsummary>
<desc>
+ <marker id="process_flag_min_heap_size"/>
<p>Changes the minimum heap size for the calling process.</p>
<p>Returns the old value of the flag.</p>
</desc>
@@ -4477,13 +4477,13 @@ RealSystem = system + MissedSystem</code>
</desc>
</func>
- <marker id="process_flag_max_heap_size"/>
<func>
<name name="process_flag" arity="2" clause_i="5"/>
<fsummary>Set process flag max_heap_size for the calling process.
</fsummary>
<type name="max_heap_size"/>
<desc>
+ <marker id="process_flag_max_heap_size"/>
<p>This flag sets the maximum heap size for the calling process.
If <c><anno>MaxHeapSize</anno></c> is an integer, the system default
values for <c>kill</c> and <c>error_logger</c> are used.
@@ -4551,13 +4551,13 @@ RealSystem = system + MissedSystem</code>
</desc>
</func>
- <marker id="process_flag_message_queue_data"/>
<func>
<name name="process_flag" arity="2" clause_i="6"/>
<fsummary>Set process flag message_queue_data for the calling process.
</fsummary>
<type name="message_queue_data"/>
<desc>
+ <marker id="process_flag_message_queue_data"/>
<p>This flag determines how messages in the message queue
are stored, as follows:</p>
<taglist>
@@ -4573,7 +4573,7 @@ RealSystem = system + MissedSystem</code>
<p>All messages in the message queue will eventually be
placed on heap. They can however temporarily be stored
off heap. This is how messages always have been stored
- up until <c>ERTS</c> 8.0.</p>
+ up until ERTS 8.0.</p>
</item>
</taglist>
<p>The default <c>message_queue_data</c> process flag is determined
@@ -5153,11 +5153,11 @@ RealSystem = system + MissedSystem</code>
that no processes execute old code in the module.</p>
<warning>
<p>This BIF is intended for the code server (see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>)
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>)
and is not to be used elsewhere.</p>
</warning>
<note>
- <p>As from <c>ERTS</c> 8.0 (Erlang/OTP 19), any lingering processes
+ <p>As from ERTS 8.0 (Erlang/OTP 19), any lingering processes
that still execute the old code is killed by this function.
In earlier versions, such incorrect use could cause much
more fatal failures, like emulator crash.</p>
@@ -6056,7 +6056,7 @@ true</pre>
<p>If <c><anno>Dest</anno></c> is a <c>pid()</c>, the timer is
automatically canceled if the process referred to by the
<c>pid()</c> is not alive, or if the process exits. This
- feature was introduced in <c>ERTS</c> 5.4.11. Notice that
+ feature was introduced in ERTS 5.4.11. Notice that
timers are not automatically canceled when
<c><anno>Dest</anno></c> is an <c>atom()</c>.</p>
<p>See also
@@ -6157,7 +6157,7 @@ true</pre>
system flag <seealso marker="#system_flag_microstate_accounting">
<c>microstate_accounting</c></seealso>.</p>
<p><c>statistics(microstate_accounting)</c> returns a list of maps
- representing some of the OS threads within <c>ERTS</c>. Each map
+ representing some of the OS threads within ERTS. Each map
contains <c>type</c> and <c>id</c> fields that can be used to
identify what
thread it is, and also a counters field that contains data about how
@@ -6249,7 +6249,7 @@ lists:map(
<c>scheduler_wall_time</c> fraction. Without extra states this
time is part of the <c>other</c> state.</item>
<tag><c>ets</c></tag>
- <item>Time spent executing <c>ets</c> BIFs. Without extra states
+ <item>Time spent executing ETS BIFs. Without extra states
this time is part of the <c>emulator</c> state.</item>
<tag><c>gc_full</c></tag>
<item>Time spent doing fullsweep garbage collection. Without extra
@@ -6265,7 +6265,7 @@ lists:map(
part of the <c>other</c> state.</item>
</taglist>
<p>The utility module
- <seealso marker="runtime_tools:msacc"><c>runtime_tools:msacc(3)</c></seealso>
+ <seealso marker="runtime_tools:msacc"><c>msacc(3)</c></seealso>
can be used to more easily analyse these statistics.</p>
<p>Returns <c>undefined</c> if system flag
<seealso marker="#system_flag_microstate_accounting">
@@ -6288,7 +6288,7 @@ lists:map(
<pre>
> <input>statistics(reductions).</input>
{2046,11}</pre>
- <note><p>As from <c>ERTS</c> 5.5 (Erlang/OTP R11B),
+ <note><p>As from ERTS 5.5 (Erlang/OTP R11B),
this value does not include reductions performed in current
time slices of currently scheduled processes. If an
exact value is wanted, use
@@ -6745,12 +6745,12 @@ ok
</desc>
</func>
- <marker id="system_flag_max_heap_size"></marker>
<func>
<name name="system_flag" arity="2" clause_i="8"/>
<fsummary>Set system flag max_heap_size.</fsummary>
<type name="max_heap_size"/>
<desc>
+ <marker id="system_flag_max_heap_size"></marker>
<p>
Sets the default maximum heap size settings for processes.
The size is specified in words. The new <c>max_heap_size</c>
@@ -7107,7 +7107,7 @@ ok
<item>
<marker id="system_info_alloc_util_allocators"></marker>
<p>Returns a list of the names of all allocators using
- the <c>ERTS</c> internal <c>alloc_util</c> framework
+ the ERTS internal <c>alloc_util</c> framework
as atoms. For more information, see section
<seealso marker="erts:erts_alloc#alloc_util">The
alloc_util framework</seealso>
@@ -7117,7 +7117,7 @@ ok
<item>
<marker id="system_info_allocator_tuple"></marker>
<p>Returns information about the specified allocator.
- As from <c>ERTS</c> 5.6.1, the return value is a list
+ As from ERTS 5.6.1, the return value is a list
of <c>{instance, InstanceNo, InstanceInfo}</c> tuples,
where <c>InstanceInfo</c> contains information about
a specific instance of the allocator.
@@ -7134,8 +7134,8 @@ ok
<p>The recognized allocators are listed in
<seealso marker="erts:erts_alloc"><c>erts_alloc(3)</c></seealso>.
Information about super carriers can be obtained from
- <c>ERTS</c> 8.0 with <c>{allocator, erts_mmap}</c> or from
- <c>ERTS</c> 5.10.4; the returned list when calling with
+ ERTS 8.0 with <c>{allocator, erts_mmap}</c> or from
+ ERTS 5.10.4; the returned list when calling with
<c>{allocator, mseg_alloc}</c> also includes an
<c>{erts_mmap, _}</c> tuple as one element in the list.</p>
<p>After reading the <c>erts_alloc(3)</c> documentation,
@@ -7619,7 +7619,7 @@ ok
(for example, <c>./configure --with-dynamic-trace=dtrace</c>).
For more information about dynamic tracing, see
<seealso marker="runtime_tools:dyntrace">
- <c>runtime_tools:dyntrace(3)</c></seealso> manual page and the
+ <c>dyntrace(3)</c></seealso> manual page and the
<c>README.dtrace</c>/<c>README.systemtap</c> files in the
Erlang source code top directory.</p>
</item>
@@ -7659,7 +7659,7 @@ ok
</item>
<tag><c>ets_limit</c></tag>
<item>
- <p>Returns the maximum number of <c>ets</c> tables allowed. This
+ <p>Returns the maximum number of ETS tables allowed. This
limit can be increased at startup by passing
command-line flag
<seealso marker="erts:erl#+e"><c>+e</c></seealso> to
@@ -7847,7 +7847,7 @@ ok
<item>
<marker id="system_info_otp_release"></marker>
<p>Returns a string containing the OTP release number of the
- OTP release that the currently executing <c>ERTS</c> application
+ OTP release that the currently executing ERTS application
is part of.</p>
<p>As from Erlang/OTP 17, the OTP release number corresponds to
the major OTP version number. No
@@ -8222,7 +8222,7 @@ ok
<tag><c>tolerant_timeofday</c></tag>
<item>
<marker id="system_info_tolerant_timeofday"></marker>
- <p>Returns whether a pre <c>ERTS</c> 7.0 backwards compatible
+ <p>Returns whether a pre ERTS 7.0 backwards compatible
compensation for sudden changes of system time is <c>enabled</c>
or <c>disabled</c>. Such compensation is <c>enabled</c> when the
<seealso marker="#system_info_time_offset">time offset</seealso>
@@ -8290,8 +8290,8 @@ ok
<p>Argument <c>scheduler</c> has changed name to
<c>scheduler_id</c> to avoid mix up with argument
<c>schedulers</c>. Argument <c>scheduler</c> was
- introduced in <c>ERTS</c> 5.5 and renamed in
- <c>ERTS</c> 5.5.1.</p>
+ introduced in ERTS 5.5 and renamed in
+ ERTS 5.5.1.</p>
</note>
</desc>
</func>
@@ -9451,7 +9451,7 @@ timestamp() ->
<desc>
<p>The delivery of trace messages (generated by
<seealso marker="#trace/3"><c>erlang:trace/3</c></seealso>,
- <seealso marker="kernel:seq_trace"><c>kernel:seq_trace(3)</c></seealso>,
+ <seealso marker="kernel:seq_trace"><c>seq_trace(3)</c></seealso>,
or <seealso marker="#system_profile/2">
<c>erlang:system_profile/2</c></seealso>)
is dislocated on the time-line
diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml
index ca3412b72c..7355be488b 100644
--- a/erts/doc/src/erlc.xml
+++ b/erts/doc/src/erlc.xml
@@ -303,9 +303,9 @@ erlc +export_all file.erl</pre>
<section>
<title>See Also</title>
<p><seealso marker="erl"><c>erl(1)</c></seealso>,
- <seealso marker="compiler:compile"><c>compiler:compile(3)</c></seealso>,
- <seealso marker="parsetools:yecc"><c>parsetools:yecc(3)</c></seealso>,
- <seealso marker="snmp:snmp"><c>snmp:snmp(3)</c></seealso></p>
+ <seealso marker="compiler:compile"><c>compile(3)</c></seealso>,
+ <seealso marker="parsetools:yecc"><c>yecc(3)</c></seealso>,
+ <seealso marker="snmp:snmp"><c>snmp(3)</c></seealso></p>
</section>
</comref>
diff --git a/erts/doc/src/erlsrv.xml b/erts/doc/src/erlsrv.xml
index 53583b625d..6c08b25220 100644
--- a/erts/doc/src/erlsrv.xml
+++ b/erts/doc/src/erlsrv.xml
@@ -527,7 +527,7 @@ void initialize_handler(void){
<title>See Also</title>
<p><seealso marker="start_erl"><c>start_erl(1)</c></seealso>,
<seealso marker="sasl:release_handler">
- <c>sasl:release_handler(3)</c></seealso></p>
+ <c>release_handler(3)</c></seealso></p>
</section>
</comref>
diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml
index a43f51b10a..8ab35851c1 100644
--- a/erts/doc/src/erts_alloc.xml
+++ b/erts/doc/src/erts_alloc.xml
@@ -246,7 +246,7 @@
If it satisfies the request, it is used, otherwise a new
carrier is created. The implementation has a time
complexity that is constant.</p>
- <p>As from <c>ERTS</c> 5.6.1 the emulator refuses to
+ <p>As from ERTS 5.6.1 the emulator refuses to
use this strategy on other allocators than <c>temp_alloc</c>.
This because it only causes problems for other allocators.</p>
</item>
@@ -454,7 +454,7 @@
enabled) is passed instead of a <c><![CDATA[<utilization>]]></c>,
a recomended non-zero utilization value is used. The value
chosen depends on the allocator type and can be changed between
- <c>ERTS</c> versions. Defaults to <c>de</c>, but this
+ ERTS versions. Defaults to <c>de</c>, but this
can be changed in the future.</p>
<p>Carriers are abandoned when
memory utilization in the allocator instance falls below the
@@ -617,7 +617,7 @@
SMP support is <c>NoSchedulers+1</c> instances. Each scheduler
uses a lock-free instance of its own and other threads use
a common instance.</p>
- <p>Before <c>ERTS</c> 5.9 it was possible to configure
+ <p>Before ERTS 5.9 it was possible to configure
a smaller number of thread-specific instances than schedulers.
This is, however, not possible anymore.</p>
</item>
@@ -688,7 +688,7 @@
<p>A map over current allocations is kept by the emulator.
The allocation map can be retrieved through module
<seealso marker="tools:instrument">
- <c>tools:instrument(3)</c></seealso>. <c>+Mim true</c>
+ <c>instrument(3)</c></seealso>. <c>+Mim true</c>
implies <c>+Mis true</c>. <c>+Mim true</c> is the same as flag
<seealso marker="erl#instr"><c>-instr</c></seealso> in
<c>erl(1)</c>.</p>
@@ -698,7 +698,7 @@
<p>Status over allocated memory is kept by the emulator.
The allocation status can be retrieved through module
<seealso marker="tools:instrument">
- <c>tools:instrument(3)</c></seealso>.</p>
+ <c>instrument(3)</c></seealso>.</p>
</item>
<tag><marker id="Mit"/><c>+Mit X</c></tag>
<item>
@@ -737,10 +737,10 @@
<p>Disables features that cannot be enabled while creating an
allocator configuration with
<seealso marker="runtime_tools:erts_alloc_config">
- <c>runtime_tools:erts_alloc_config(3)</c></seealso>.</p>
+ <c>erts_alloc_config(3)</c></seealso>.</p>
<note>
<p>This option is to be used only while running
- <c>runtime_tools:erts_alloc_config(3)</c>, <em>not</em> when
+ <c>erts_alloc_config(3)</c>, <em>not</em> when
using the created configuration.</p>
</note>
</item>
@@ -780,7 +780,7 @@
</note>
<p>The <seealso marker="runtime_tools:erts_alloc_config">
- <c>runtime_tools:erts_alloc_config(3)</c></seealso>
+ <c>erts_alloc_config(3)</c></seealso>
tool can be used to aid creation of an
<c>erts_alloc</c> configuration that is suitable for a limited
number of runtime scenarios.</p>
@@ -791,9 +791,9 @@
<p><seealso marker="erl"><c>erl(1)</c></seealso>,
<seealso marker="erlang"><c>erlang(3)</c></seealso>,
<seealso marker="runtime_tools:erts_alloc_config">
- <c>runtime_tools:erts_alloc_config(3)</c></seealso>,
+ <c>erts_alloc_config(3)</c></seealso>,
<seealso marker="tools:instrument">
- <c>tools:instrument(3)</c></seealso></p>
+ <c>instrument(3)</c></seealso></p>
</section>
</cref>
diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml
index 602b88f6ed..1d5d280338 100644
--- a/erts/doc/src/escript.xml
+++ b/erts/doc/src/escript.xml
@@ -4,7 +4,7 @@
<comref>
<header>
<copyright>
- <year>2007</year><year>2015</year>
+ <year>2007</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -101,7 +101,7 @@ io:setopts([{encoding, unicode}])</code>
is <c>latin1</c>, as the script runs in a non-interactive terminal
(see section
<seealso marker="stdlib:unicode_usage#unicode_options_summary">
- Summary of Options</seealso>) in the <c>STDLIB</c> User's Guide.</p>
+ Summary of Options</seealso>) in the STDLIB User's Guide.</p>
</note>
<p>On the third line (or second line depending on the presence
of the Emacs directive), arguments can be specified to
@@ -193,7 +193,7 @@ halt(1).</pre>
as one of the emulator flags. <c>Module</c> must be the
name of a module that has an exported <c>main/1</c>
function. For more information about archives and code loading, see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
<p>It is often very convenient to have a header in
the escript, especially on Unix platforms. However, the header
is optional, so you directly can "execute"
diff --git a/erts/doc/src/inet_cfg.xml b/erts/doc/src/inet_cfg.xml
index 3b104a0032..0cfcc7905d 100644
--- a/erts/doc/src/inet_cfg.xml
+++ b/erts/doc/src/inet_cfg.xml
@@ -40,7 +40,7 @@
for specific settings for Erlang to function properly on a correctly
IP-configured platform.</p>
- <p>When Erlang starts up it reads the <c>Kernel</c> variable
+ <p>When Erlang starts up it reads the Kernel variable
<c><![CDATA[inetrc]]></c>, which, if defined, is to specify the location
and name of a user configuration file. Example:</p>
@@ -57,7 +57,7 @@
<code type="none"><![CDATA[
% export ERL_INETRC=./cfg_files/erl_inetrc]]></code>
- <p>Notice that the <c>Kernel</c> variable <c><![CDATA[inetrc]]></c>
+ <p>Notice that the Kernel variable <c><![CDATA[inetrc]]></c>
overrides this environment variable.</p>
<p>If no user configuration file is specified and Erlang is started
@@ -68,7 +68,7 @@
<c>/etc/host.conf</c> and <c>/etc/nsswitch.conf</c>) in these modes,
except for <c>/etc/resolv.conf</c> and <c>/etc/hosts</c> that is read and
monitored for changes on Unix platforms for the internal DNS client
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>.</p>
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>.</p>
<p>If Erlang is started in long name distributed mode, it needs to
get the domain name from somewhere and reads system <c>inet</c>
@@ -138,7 +138,7 @@
<p><c><![CDATA[File = string()]]></c></p>
<p>Specify a system file that Erlang is to read resolver
configuration from for the internal DNS client
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>,
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>,
and monitor for changes, even if it does not exist.
The path must be absolute.</p>
<p>This can override the configuration parameters
@@ -200,7 +200,7 @@
<p><c><![CDATA[Port = integer()]]></c></p>
<p>Add address (and port, if other than default) of the primary
nameserver to use for
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>.
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>.
</p>
</item>
<tag><c><![CDATA[{alt_nameserver, IP [,Port]}.]]></c></tag>
@@ -209,14 +209,14 @@
<p><c><![CDATA[Port = integer()]]></c></p>
<p>Add address (and port, if other than default) of the secondary
nameserver for
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>.
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>.
</p>
</item>
<tag><c><![CDATA[{search, Domains}.]]></c></tag>
<item>
<p><c><![CDATA[Domains = [string()]]]></c></p>
<p>Add search domains for
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>.
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>.
</p>
</item>
<tag><c><![CDATA[{lookup, Methods}.]]></c></tag>
@@ -229,7 +229,7 @@
<item><c><![CDATA[file]]></c> (use host data retrieved from system
configuration files and/or the user configuration file)</item>
<item><c><![CDATA[dns]]></c> (use the Erlang DNS client
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>
for nameserver queries)</item>
</list>
<p>The lookup method <c><![CDATA[string]]></c> tries to
@@ -249,7 +249,7 @@
<item>
<p><c><![CDATA[Time = integer()]]></c></p>
<p>Set how often (in milliseconds) the resolver cache for
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>
is refreshed (that is, expired DNS records are deleted).
Defaults to 1 hour.</p>
</item>
@@ -258,28 +258,28 @@
<p><c><![CDATA[Time = integer()]]></c></p>
<p>Set the time to wait until retry (in milliseconds) for DNS queries
made by
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>.
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>.
Defaults to 2 seconds.</p>
</item>
<tag><c><![CDATA[{retry, N}.]]></c></tag>
<item>
<p><c><![CDATA[N = integer()]]></c></p>
<p>Set the number of DNS queries
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>
will try before giving up. Defaults to 3.</p>
</item>
<tag><c><![CDATA[{inet6, Bool}.]]></c></tag>
<item>
<p><c><![CDATA[Bool = true | false]]></c></p>
<p>Tells the DNS client
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>
to look up IPv6 addresses. Defaults to <c>false</c>.</p>
</item>
<tag><c><![CDATA[{usevc, Bool}.]]></c></tag>
<item>
<p><c><![CDATA[Bool = true | false]]></c></p>
<p>Tells the DNS client
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>
to use TCP (Virtual Circuit) instead of UDP. Defaults to
<c>false</c>.</p>
</item>
@@ -287,7 +287,7 @@
<item>
<p><c><![CDATA[Version = false | 0]]></c></p>
<p>Sets the EDNS version that
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>
will use. The only allowed version is zero. Defaults to <c>false</c>,
which means not to use EDNS.</p>
</item>
@@ -295,7 +295,7 @@
<item>
<p><c><![CDATA[N = integer()]]></c></p>
<p>Sets the allowed UDP payload size
- <seealso marker="kernel:inet_res"><c>kernel:inet_res(3)</c></seealso>
+ <seealso marker="kernel:inet_res"><c>inet_res(3)</c></seealso>
will advertise in EDNS queries. Also sets the limit
when the DNS query will be deemed too large for UDP
forcing a TCP query instead; this is not entirely
diff --git a/erts/doc/src/init.xml b/erts/doc/src/init.xml
index 54507c6572..c14f0a558d 100644
--- a/erts/doc/src/init.xml
+++ b/erts/doc/src/init.xml
@@ -42,7 +42,7 @@
<p><c>init</c> reads the boot script, which contains instructions on
how to initiate the system. For more information about boot scripts, see
- <seealso marker="sasl:script"><c>sasl:script(4)</c></seealso>.</p>
+ <seealso marker="sasl:script"><c>script(4)</c></seealso>.</p>
<p><c>init</c> also contains functions to restart, reboot, and stop
the system.</p>
@@ -154,7 +154,7 @@
terminates. If command-line flag <c>-heart</c> was specified,
the <c>heart</c> program tries to reboot the system. For more
information, see
- <seealso marker="kernel:heart"><c>kernel:heart(3)</c></seealso>.</p>
+ <seealso marker="kernel:heart"><c>heart(3)</c></seealso>.</p>
<p>To limit the shutdown time, the time <c>init</c> is allowed
to spend taking down applications, command-line flag
<c>-shutdown_time</c> is to be used.</p>
@@ -207,7 +207,7 @@
command-line flag <c>-heart</c> was specified, the <c>heart</c>
program is terminated before the Erlang node terminates.
For more information, see
- <seealso marker="kernel:heart"><c>kernel:heart(3)</c></seealso>.</p>
+ <seealso marker="kernel:heart"><c>heart(3)</c></seealso>.</p>
<p>To limit the shutdown time, the time <c>init</c> is allowed
to spend taking down applications, command-line flag
<c>-shutdown_time</c> is to be used.</p>
@@ -254,9 +254,9 @@
useful when you want to elaborate with code loading from
archives without editing the <c>boot script</c>. For more
information about interpretation of boot scripts, see
- <seealso marker="sasl:script"><c>sasl:script(4)</c></seealso>.
+ <seealso marker="sasl:script"><c>script(4)</c></seealso>.
The flag has also a similar effect on how the code server works; see
- <seealso marker="kernel:code"><c>kernel:code(3)</c></seealso>.</p>
+ <seealso marker="kernel:code"><c>code(3)</c></seealso>.</p>
</item>
<tag><c>-epmd_module Module</c></tag>
<item>
@@ -361,7 +361,7 @@ error</pre>
<section>
<title>See Also</title>
<p><seealso marker="erl_prim_loader"><c>erl_prim_loader(3)</c></seealso>,
- <seealso marker="kernel:heart"><c>kernel:heart(3)</c></seealso></p>
+ <seealso marker="kernel:heart"><c>heart(3)</c></seealso></p>
</section>
</erlref>
diff --git a/erts/doc/src/introduction.xml b/erts/doc/src/introduction.xml
index 97a0d5999e..790e24f9f3 100644
--- a/erts/doc/src/introduction.xml
+++ b/erts/doc/src/introduction.xml
@@ -34,7 +34,7 @@
</header>
<section>
<title>Scope</title>
- <p>The Erlang Runtime System Application, <c>ERTS</c>, contains
+ <p>The Erlang Runtime System Application, ERTS, contains
functionality necessary to run the Erlang system.</p>
<note>
<p>By default, <c><![CDATA[ERTS]]></c> is only guaranteed to be
diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml
index 1b297c5d29..2a14f1e47b 100644
--- a/erts/doc/src/match_spec.xml
+++ b/erts/doc/src/match_spec.xml
@@ -142,7 +142,7 @@
</list>
<p>A match specification used in
- <seealso marker="stdlib:ets"><c>stdlib:ets(3)</c></seealso>
+ <seealso marker="stdlib:ets"><c>ets(3)</c></seealso>
can be described in the following <em>informal</em> grammar:</p>
<list type="bulleted">
@@ -678,7 +678,7 @@
</item>
<item>
<p>If the match specification is executed when selecting objects
- from an <c>ets</c> table:</p>
+ from an ETS table:</p>
<p>Evaluate the expressions in order and return the value of
the last expression (typically there is only one expression
in this context).</p>
@@ -691,11 +691,11 @@
<section>
<marker id="differences_ets_tracing"/>
<title>Differences between Match Specifications in ETS and Tracing</title>
- <p><c>ets</c> match specifications produce a return value.
+ <p>ETS match specifications produce a return value.
Usually the <c><![CDATA[MatchBody]]></c> contains one single
<c><![CDATA[ConditionExpression]]></c> that defines the return value
without any side effects. Calls with side effects are not allowed in
- the <c>ets</c> context.</p>
+ the ETS context.</p>
<p>When tracing there is no return value to produce, the
match specification either matches or does not. The effect when the
@@ -824,7 +824,7 @@
<section>
<title>ETS Examples</title>
- <p>Match all objects in an <c>ets</c> table, where the first element is
+ <p>Match all objects in an ETS table, where the first element is
the atom <c>'strider'</c> and the tuple arity is 3, and return the whole
object:</p>
@@ -834,7 +834,7 @@
['$_']}]
]]></code>
- <p>Match all objects in an <c>ets</c> table with arity &gt; 1 and the first
+ <p>Match all objects in an ETS table with arity &gt; 1 and the first
element is 'gandalf', and return element 2:</p>
<code type="none"><![CDATA[
@@ -863,7 +863,7 @@
]]></code>
<p>Function <seealso marker="stdlib:ets#test_ms/2"><c>ets:test_ms/2></c></seealso>
- can be useful for testing complicated <c>ets</c> matches.</p>
+ can be useful for testing complicated ETS matches.</p>
</section>
</chapter>
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml
index ca3f654c36..2a36e5568c 100644
--- a/erts/doc/src/notes.xml
+++ b/erts/doc/src/notes.xml
@@ -9380,9 +9380,9 @@
dynamically linking against <c>libssl.so</c> and
<c>libcrypto.so</c>. The runtime library search path has
also been extended. </item><item> The <c>configure</c>
- scripts of <c>erl_interface</c> and <c>odbc</c> now
+ scripts of Erl_interface and ODBC now
search for thread libraries and thread library quirks the
- same way as <c>erts</c> do. </item><item> The
+ same way as ERTS do. </item><item> The
<c>configure</c> script of the <c>odbc</c> application
now also looks for odbc libraries in <c>lib64</c> and
<c>lib/64</c> directories when building on a 64-bit
@@ -10498,7 +10498,7 @@
</item>
<item>
<p>
- A corrected bug in <c>ets</c> for <c>bag</c> and
+ A corrected bug in ETS for <c>bag</c> and
<c>duplicate_bag</c>. A <c>delete/2</c> or
<c>lookup_element/3</c> could miss objects in a fixed
table if one or more objects with the same key had
@@ -10940,7 +10940,7 @@
<list>
<item>
<p>
- A corrected bug in <c>ets</c> for <c>bag</c> and
+ A corrected bug in ETS for <c>bag</c> and
<c>duplicate_bag</c>. A <c>delete/2</c> or
<c>lookup_element/3</c> could miss objects in a fixed
table if one or more objects with the same key had
diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml
index 4780c00ea4..ad7b2c5b85 100644
--- a/erts/doc/src/run_erl.xml
+++ b/erts/doc/src/run_erl.xml
@@ -174,7 +174,7 @@
without Daylight Saving Time), rather than in local time.
This does not affect data coming from Erlang,
only the logs output directly by <c>run_erl</c>. Application
- <c>SASL</c> can be modified accordingly by setting the Erlang
+ SASL can be modified accordingly by setting the Erlang
application variable <c><![CDATA[utc_log]]></c> to
<c><![CDATA[true]]></c>.</p>
</item>
diff --git a/erts/doc/src/start_erl.xml b/erts/doc/src/start_erl.xml
index 50f8c58a48..4887d4606e 100644
--- a/erts/doc/src/start_erl.xml
+++ b/erts/doc/src/start_erl.xml
@@ -163,7 +163,7 @@
<title>See Also</title>
<p><seealso marker="erlsrv"><c>erlsrv(1)</c></seealso>,
<seealso marker="sasl:release_handler">
- <c>sasl:release_handler(3)</c></seealso></p>
+ <c>release_handler(3)</c></seealso></p>
</section>
</comref>
diff --git a/erts/doc/src/time_correction.xml b/erts/doc/src/time_correction.xml
index 8042ad3b99..77e7a40529 100644
--- a/erts/doc/src/time_correction.xml
+++ b/erts/doc/src/time_correction.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1999</year><year>2015</year>
+ <year>1999</year><year>2016</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -35,7 +35,7 @@
<section>
<title>New Extended Time Functionality</title>
- <note><p>As from Erlang/OTP 18 (<c>ERTS</c> 7.0) the time functionality
+ <note><p>As from Erlang/OTP 18 (ERTS 7.0) the time functionality
has been extended. This includes a
<seealso marker="#The_New_Time_API">new API</seealso>
for time and
@@ -247,7 +247,7 @@
everything that has anything to do with time. All timers,
regardless of it is a <c>receive ... after</c> timer, BIF timer,
or a timer in the
- <seealso marker="stdlib:timer"><c>stdlib:timer(3)</c></seealso>
+ <seealso marker="stdlib:timer"><c>timer(3)</c></seealso>
module, are triggered relative Erlang monotonic time. Even
<seealso marker="#Erlang_System_Time">Erlang system
time</seealso> is based on Erlang monotonic time.
@@ -408,7 +408,7 @@
and does not change later. This is the default behavior, but
not because it is the best mode (which it is not). It is
default <em>only</em> because this is how the runtime system
- behaved until <c>ERTS</c> 7.0.
+ behaved until ERTS 7.0.
Ensure that your Erlang code that can execute during a time
warp is <seealso marker="#Time_Warp_Safe_Code">time warp
safe</seealso> before enabling other modes.</p>
@@ -663,7 +663,7 @@
<marker id="The_New_Erlang_Monotonic_Time"/>
<section>
<title>New Erlang Monotonic Time</title>
- <p>Erlang monotonic time as such is new as from <c>ERTS</c> 7.0.
+ <p>Erlang monotonic time as such is new as from ERTS 7.0.
It is introduced to detach time measurements, such as elapsed
time from calendar time. In many use cases there is a need to
measure elapsed time or specify a time relative to another point
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index ad107b4861..dddcfbb77d 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -57,10 +57,13 @@ static struct {
Process *erts_code_purger = NULL;
-ErtsLiteralArea *erts_copy_literal_area = NULL;
#ifdef ERTS_DIRTY_SCHEDULERS
Process *erts_dirty_process_code_checker;
#endif
+erts_smp_atomic_t erts_copy_literal_area__;
+#define ERTS_SET_COPY_LITERAL_AREA(LA) \
+ erts_smp_atomic_set_nob(&erts_copy_literal_area__, \
+ (erts_aint_t) (LA))
#ifdef ERTS_NEW_PURGE_STRATEGY
Process *erts_literal_area_collector = NULL;
@@ -112,6 +115,8 @@ erts_beam_bif_load_init(void)
release_literal_areas.first = NULL;
release_literal_areas.last = NULL;
#endif
+ erts_smp_atomic_init_nob(&erts_copy_literal_area__,
+ (erts_aint_t) NULL);
init_purge_state();
}
@@ -893,7 +898,7 @@ erts_proc_copy_literal_area(Process *c_p, int *redsp, int fcalls, int gc_allowed
Uint lit_bsize;
ErlHeapFragment *hfrag;
- la = erts_copy_literal_area;
+ la = ERTS_COPY_LITERAL_AREA();
if (!la)
return am_ok;
@@ -971,8 +976,13 @@ erts_proc_copy_literal_area(Process *c_p, int *redsp, int fcalls, int gc_allowed
}
if (any_heap_ref_ptrs(c_p->stop, c_p->hend, literals, lit_bsize))
+ goto literal_gc;
+ *redsp += 1;
+#ifdef HIPE
+ if (nstack_any_heap_ref_ptrs(c_p, literals, lit_bsize))
goto literal_gc;
*redsp += 1;
+#endif
if (any_heap_refs(c_p->heap, c_p->htop, literals, lit_bsize))
goto literal_gc;
*redsp += 1;
@@ -1486,16 +1496,33 @@ hfrag_literal_copy(Eterm **hpp, ErlOffHeap *ohp,
#ifdef ERTS_NEW_PURGE_STRATEGY
+#ifdef ERTS_SMP
+
ErtsThrPrgrLaterOp later_literal_area_switch;
-#ifdef ERTS_SMP
+typedef struct {
+ ErtsThrPrgrLaterOp lop;
+ ErtsLiteralArea *la;
+} ErtsLaterReleasLiteralArea;
+
static void
-complete_literal_area_switch(void *unused)
+later_release_literal_area(void *vlrlap)
+{
+ ErtsLaterReleasLiteralArea *lrlap;
+ lrlap = (ErtsLaterReleasLiteralArea *) vlrlap;
+ erts_release_literal_area(lrlap->la);
+ erts_free(ERTS_ALC_T_RELEASE_LAREA, vlrlap);
+}
+
+static void
+complete_literal_area_switch(void *literal_area)
{
Process *p = erts_literal_area_collector;
erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS);
erts_resume(p, ERTS_PROC_LOCK_STATUS);
erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
+ if (literal_area)
+ erts_release_literal_area((ErtsLiteralArea *) literal_area);
}
#endif
@@ -1506,6 +1533,7 @@ BIF_RETTYPE erts_internal_release_literal_area_switch_0(BIF_ALIST_0)
#ifndef ERTS_NEW_PURGE_STRATEGY
BIF_ERROR(BIF_P, EXC_NOTSUP);
#else
+ ErtsLiteralArea *unused_la;
ErtsLiteralAreaRef *la_ref;
if (BIF_P != erts_literal_area_collector)
@@ -1522,26 +1550,45 @@ BIF_RETTYPE erts_internal_release_literal_area_switch_0(BIF_ALIST_0)
erts_smp_mtx_unlock(&release_literal_areas.mtx);
- if (erts_copy_literal_area)
- erts_release_literal_area(erts_copy_literal_area);
+ unused_la = ERTS_COPY_LITERAL_AREA();
if (!la_ref) {
- erts_copy_literal_area = NULL;
+ ERTS_SET_COPY_LITERAL_AREA(NULL);
+ if (unused_la) {
+#ifdef ERTS_SMP
+ ErtsLaterReleasLiteralArea *lrlap;
+ lrlap = erts_alloc(ERTS_ALC_T_RELEASE_LAREA,
+ sizeof(ErtsLaterReleasLiteralArea));
+ lrlap->la = unused_la;
+ erts_schedule_thr_prgr_later_cleanup_op(
+ later_release_literal_area,
+ (void *) lrlap,
+ &lrlap->lop,
+ (sizeof(ErtsLaterReleasLiteralArea)
+ + sizeof(ErtsLiteralArea)
+ + ((unused_la->end
+ - &unused_la->start[0])
+ - 1)*(sizeof(Eterm))));
+#else
+ erts_release_literal_area(unused_la);
+#endif
+ }
BIF_RET(am_false);
}
- erts_copy_literal_area = la_ref->literal_area;
+ ERTS_SET_COPY_LITERAL_AREA(la_ref->literal_area);
erts_free(ERTS_ALC_T_LITERAL_REF, la_ref);
-#ifndef ERTS_SMP
- BIF_RET(am_true);
-#else
+#ifdef ERTS_SMP
erts_schedule_thr_prgr_later_op(complete_literal_area_switch,
- NULL,
+ unused_la,
&later_literal_area_switch);
erts_suspend(BIF_P, ERTS_PROC_LOCK_MAIN, NULL);
ERTS_BIF_YIELD_RETURN(BIF_P, am_true);
+#else
+ erts_release_literal_area(unused_la);
+ BIF_RET(am_true);
#endif
#endif /* ERTS_NEW_PURGE_STRATEGY */
@@ -1723,8 +1770,8 @@ BIF_RETTYPE erts_internal_purge_module_2(BIF_ALIST_2)
end = (BeamInstr *)((char *)code + modp->old.code_length);
erts_fun_purge_prepare(code, end);
#if !defined(ERTS_NEW_PURGE_STRATEGY)
- ASSERT(!erts_copy_literal_area);
- erts_copy_literal_area = modp->old.code_hdr->literal_area;
+ ASSERT(!ERTS_COPY_LITERAL_AREA());
+ ERTS_SET_COPY_LITERAL_AREA(modp->old.code_hdr->literal_area);
#endif
}
erts_runlock_old_code(code_ix);
@@ -1766,8 +1813,8 @@ BIF_RETTYPE erts_internal_purge_module_2(BIF_ALIST_2)
erts_fun_purge_abort_prepare(purge_state.funs, purge_state.fe_ix);
#if !defined(ERTS_NEW_PURGE_STRATEGY)
- ASSERT(erts_copy_literal_area);
- erts_copy_literal_area = NULL;
+ ASSERT(ERTS_COPY_LITERAL_AREA());
+ ERTS_SET_COPY_LITERAL_AREA(NULL);
#endif
#ifndef ERTS_SMP
erts_fun_purge_abort_finalize(purge_state.funs, purge_state.fe_ix);
@@ -1879,8 +1926,8 @@ BIF_RETTYPE erts_internal_purge_module_2(BIF_ALIST_2)
#if !defined(ERTS_NEW_PURGE_STRATEGY)
- ASSERT(erts_copy_literal_area == literals);
- erts_copy_literal_area = NULL;
+ ASSERT(ERTS_COPY_LITERAL_AREA() == literals);
+ ERTS_SET_COPY_LITERAL_AREA(NULL);
erts_release_literal_area(literals);
#else /* ERTS_NEW_PURGE_STRATEGY */
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index b3e6ebf651..ef4cdf9d5a 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -1960,6 +1960,8 @@ void process_main(void)
ErtsMessage* msgp;
PROCESS_MAIN_CHK_LOCKS(c_p);
+ ERTS_CHK_MBUF_SZ(c_p);
+
PreFetch(0, next);
msgp = PEEK_MESSAGE(c_p);
@@ -2047,6 +2049,7 @@ void process_main(void)
}
ERTS_DBG_CHK_REDS(c_p, FCALLS);
+ ERTS_CHK_MBUF_SZ(c_p);
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
@@ -2583,7 +2586,9 @@ do { \
c_p->fcalls = FCALLS;
PROCESS_MAIN_CHK_LOCKS(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p));
+ ERTS_CHK_MBUF_SZ(c_p);
result = (*bf)(c_p, tmp_reg);
+ ERTS_CHK_MBUF_SZ(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p) || is_non_value(result));
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
@@ -2614,7 +2619,9 @@ do { \
c_p->fcalls = FCALLS;
PROCESS_MAIN_CHK_LOCKS(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p));
+ ERTS_CHK_MBUF_SZ(c_p);
result = (*bf)(c_p, tmp_reg);
+ ERTS_CHK_MBUF_SZ(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p) || is_non_value(result));
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
@@ -2644,7 +2651,9 @@ do { \
SWAPOUT;
PROCESS_MAIN_CHK_LOCKS(c_p);
ERTS_SMP_UNREQ_PROC_MAIN_LOCK(c_p);
+ ERTS_CHK_MBUF_SZ(c_p);
result = (*bf)(c_p, reg, live);
+ ERTS_CHK_MBUF_SZ(c_p);
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
ERTS_SMP_REQ_PROC_MAIN_LOCK(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
@@ -2685,7 +2694,9 @@ do { \
SWAPOUT;
PROCESS_MAIN_CHK_LOCKS(c_p);
ERTS_SMP_UNREQ_PROC_MAIN_LOCK(c_p);
+ ERTS_CHK_MBUF_SZ(c_p);
result = (*bf)(c_p, reg, live);
+ ERTS_CHK_MBUF_SZ(c_p);
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
ERTS_SMP_REQ_PROC_MAIN_LOCK(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
@@ -2728,7 +2739,9 @@ do { \
SWAPOUT;
PROCESS_MAIN_CHK_LOCKS(c_p);
ERTS_SMP_UNREQ_PROC_MAIN_LOCK(c_p);
+ ERTS_CHK_MBUF_SZ(c_p);
result = (*bf)(c_p, reg, live);
+ ERTS_CHK_MBUF_SZ(c_p);
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
ERTS_SMP_REQ_PROC_MAIN_LOCK(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
@@ -2766,7 +2779,9 @@ do { \
c_p->fcalls = FCALLS;
PROCESS_MAIN_CHK_LOCKS(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p));
+ ERTS_CHK_MBUF_SZ(c_p);
result = (*bf)(c_p, tmp_reg);
+ ERTS_CHK_MBUF_SZ(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p) || is_non_value(result));
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
@@ -2793,7 +2808,9 @@ do { \
bf = (BifFunction) Arg(0);
PROCESS_MAIN_CHK_LOCKS(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p));
+ ERTS_CHK_MBUF_SZ(c_p);
result = (*bf)(c_p, tmp_reg);
+ ERTS_CHK_MBUF_SZ(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p) || is_non_value(result));
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
@@ -2843,7 +2860,9 @@ do { \
ASSERT(!ERTS_PROC_IS_EXITING(c_p));
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
live_hf_end = c_p->mbuf;
+ ERTS_CHK_MBUF_SZ(c_p);
result = (*bf)(c_p, reg, I);
+ ERTS_CHK_MBUF_SZ(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p) || is_non_value(result));
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
ERTS_HOLE_CHECK(c_p);
@@ -3556,11 +3575,13 @@ do { \
ASSERT(c_p->scheduler_data);
#endif
live_hf_end = c_p->mbuf;
+ ERTS_CHK_MBUF_SZ(c_p);
erts_pre_nif(&env, c_p, (struct erl_module_nif*)I[2], NULL);
nif_bif_result = (*fp)(&env, bif_nif_arity, reg);
if (env.exception_thrown)
nif_bif_result = THE_NON_VALUE;
erts_post_nif(&env);
+ ERTS_CHK_MBUF_SZ(c_p);
PROCESS_MAIN_CHK_LOCKS(c_p);
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
@@ -3612,7 +3633,9 @@ do { \
Eterm (*bf)(Process*, Eterm*, BeamInstr*) = vbf;
ASSERT(!ERTS_PROC_IS_EXITING(c_p));
live_hf_end = c_p->mbuf;
+ ERTS_CHK_MBUF_SZ(c_p);
nif_bif_result = (*bf)(c_p, reg, I);
+ ERTS_CHK_MBUF_SZ(c_p);
ASSERT(!ERTS_PROC_IS_EXITING(c_p) ||
is_non_value(nif_bif_result));
ERTS_VERIFY_UNUSED_TEMP_ALLOC(c_p);
diff --git a/erts/emulator/beam/erl_alloc.types b/erts/emulator/beam/erl_alloc.types
index 971052b947..6e8710eb8a 100644
--- a/erts/emulator/beam/erl_alloc.types
+++ b/erts/emulator/beam/erl_alloc.types
@@ -314,6 +314,7 @@ type RUNQ_BLNS LONG_LIVED SYSTEM run_queue_balancing
type THR_PRGR_IDATA LONG_LIVED SYSTEM thr_prgr_internal_data
type THR_PRGR_DATA LONG_LIVED SYSTEM thr_prgr_data
type T_THR_PRGR_DATA SHORT_LIVED SYSTEM temp_thr_prgr_data
+type RELEASE_LAREA SHORT_LIVED SYSTEM release_literal_area
+endif
#
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 8b0dd9a5a6..75f8ebefbd 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -517,6 +517,8 @@ delay_garbage_collection(Process *p, ErlHeapFragment *live_hf_end, int need, int
erts_proc_sched_data((p))->virtual_reds += vreds;
}
+ ERTS_CHK_MBUF_SZ(p);
+
ASSERT(CONTEXT_REDS >= erts_proc_sched_data(p)->virtual_reds);
return reds_left;
}
@@ -527,6 +529,8 @@ young_gen_usage(Process *p)
Uint hsz;
Eterm *aheap;
+ ERTS_CHK_MBUF_SZ(p);
+
hsz = p->mbuf_sz;
if (p->flags & F_ON_HEAP_MSGQ) {
@@ -590,6 +594,8 @@ garbage_collect(Process* p, ErlHeapFragment *live_hf_end,
DTRACE_CHARBUF(pidbuf, DTRACE_TERM_BUF_SIZE);
#endif
+ ERTS_CHK_MBUF_SZ(p);
+
ASSERT(CONTEXT_REDS - ERTS_REDS_LEFT(p, fcalls)
>= erts_proc_sched_data(p)->virtual_reds);
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c
index 91e06cde2d..e4c696ae3b 100644
--- a/erts/emulator/beam/erl_message.c
+++ b/erts/emulator/beam/erl_message.c
@@ -1842,3 +1842,20 @@ void erts_factory_undo(ErtsHeapFactory* factory)
factory->heap_frags = NULL;
#endif
}
+
+Uint
+erts_mbuf_size(Process *p)
+{
+ Uint sz = 0;
+ ErlHeapFragment* bp;
+ ErtsMessage* mp;
+
+ for (bp = p->mbuf; bp; bp = bp->next)
+ sz += bp->used_size;
+
+ for (mp = p->msg_frag; mp; mp = mp->next)
+ for (bp = erts_message_to_heap_frag(mp); bp; bp = bp->next)
+ sz += bp->used_size;
+
+ return sz;
+}
diff --git a/erts/emulator/beam/erl_message.h b/erts/emulator/beam/erl_message.h
index 6df969367b..42ed14e69c 100644
--- a/erts/emulator/beam/erl_message.h
+++ b/erts/emulator/beam/erl_message.h
@@ -499,4 +499,15 @@ erts_msgq_replace_msg_ref(ErlMessageQueue *msgq, ErtsMessage *newp, ErtsMessage
#endif
+Uint erts_mbuf_size(Process *p);
+#if defined(DEBUG) || 0
+# define ERTS_CHK_MBUF_SZ(P) \
+ do { \
+ Uint actual_mbuf_sz__ = erts_mbuf_size((P)); \
+ ERTS_ASSERT((P)->mbuf_sz >= actual_mbuf_sz__); \
+ } while (0)
+#else
+# define ERTS_CHK_MBUF_SZ(P) ((void) 1)
+#endif
+
#endif
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index ef2fb93106..27392a5996 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -156,7 +156,9 @@ static Eterm* alloc_heap_heavy(ErlNifEnv* env, size_t need, Eterm* hp)
HEAP_TOP(env->proc) = env->hp;
}
else {
- env->heap_frag->used_size = hp - env->heap_frag->mem;
+ Uint usz = env->hp - env->heap_frag->mem;
+ env->proc->mbuf_sz += usz - env->heap_frag->used_size;
+ env->heap_frag->used_size = usz;
ASSERT(env->heap_frag->used_size <= env->heap_frag->alloc_size);
}
hp = erts_heap_alloc(env->proc, need, MIN_HEAP_FRAG_SZ);
@@ -308,11 +310,14 @@ static void full_flush_env(ErlNifEnv* env)
HEAP_TOP(c_p) = env->hp;
}
else {
+ Uint usz;
ASSERT(env->hp_end != HEAP_LIMIT(c_p));
ASSERT(env->hp_end - env->hp <= env->heap_frag->alloc_size);
HEAP_TOP(c_p) = HEAP_TOP(env->proc);
- env->heap_frag->used_size = env->hp - env->heap_frag->mem;
+ usz = env->hp - env->heap_frag->mem;
+ env->proc->mbuf_sz += usz - env->heap_frag->used_size;
+ env->heap_frag->used_size = usz;
ASSERT(env->heap_frag->used_size <= env->heap_frag->alloc_size);
@@ -394,9 +399,12 @@ static void flush_env(ErlNifEnv* env)
HEAP_TOP(env->proc) = env->hp;
}
else {
+ Uint usz;
ASSERT(env->hp_end != HEAP_LIMIT(env->proc));
ASSERT(env->hp_end - env->hp <= env->heap_frag->alloc_size);
- env->heap_frag->used_size = env->hp - env->heap_frag->mem;
+ usz = env->hp - env->heap_frag->mem;
+ env->proc->mbuf_sz += usz - env->heap_frag->used_size;
+ env->heap_frag->used_size = usz;
ASSERT(env->heap_frag->used_size <= env->heap_frag->alloc_size);
}
}
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index 94c13bb948..3347a7a60e 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -1328,10 +1328,13 @@ ERTS_GLB_INLINE void erts_heap_frag_shrink(Process* p, Eterm* hp);
ERTS_GLB_INLINE void erts_heap_frag_shrink(Process* p, Eterm* hp)
{
ErlHeapFragment* hf = MBUF(p);
+ Uint sz;
ASSERT(hf!=NULL && (hp - hf->mem < hf->alloc_size));
- hf->used_size = hp - hf->mem;
+ sz = hp - hf->mem;
+ p->mbuf_sz -= hf->used_size - sz;
+ hf->used_size = sz;
}
#endif /* inline */
@@ -1549,9 +1552,9 @@ extern int erts_system_profile_ts_type;
#define ERTS_SCHEDULER_IS_DIRTY(ESDP) \
((ESDP)->dirty_no.s.num != 0)
#define ERTS_SCHEDULER_IS_DIRTY_CPU(ESDP) \
- ((ESDP)->dirty_no.s.type == 0)
+ (ERTS_SCHEDULER_IS_DIRTY((ESDP)) & ((ESDP)->dirty_no.s.type == 0))
#define ERTS_SCHEDULER_IS_DIRTY_IO(ESDP) \
- ((ESDP)->dirty_no.s.type == 1)
+ (ERTS_SCHEDULER_IS_DIRTY((ESDP)) & ((ESDP)->dirty_no.s.type == 1))
#else
#define ERTS_SCHEDULER_IS_DIRTY(ESDP) 0
#define ERTS_SCHEDULER_IS_DIRTY_CPU(ESDP) 0
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index f4d92564c1..8c84303997 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -3157,7 +3157,7 @@ erts_tracer_update(ErtsTracer *tracer, const ErtsTracer new_tracer)
Not sure if it is worth it, we save 4 words (sizeof(ErlHeapFragment))
per tracer. */
Eterm *hp = erts_alloc(ERTS_ALC_T_HEAP_FRAG,
- 2*sizeof(Eterm) + sizeof(ErtsThrPrgrLaterOp));
+ 3*sizeof(Eterm) + sizeof(ErtsThrPrgrLaterOp));
*tracer = CONS(hp, ERTS_TRACER_MODULE(new_tracer),
ERTS_TRACER_STATE(new_tracer));
} else {
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index e6dc5303a8..b2c76aa605 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -1016,7 +1016,10 @@ typedef struct ErtsLiteralArea_ {
#define ERTS_LITERAL_AREA_ALLOC_SIZE(N) \
(sizeof(ErtsLiteralArea) + sizeof(Eterm)*((N) - 1))
-extern ErtsLiteralArea *erts_copy_literal_area;
+extern erts_smp_atomic_t erts_copy_literal_area__;
+#define ERTS_COPY_LITERAL_AREA() \
+ ((ErtsLiteralArea *) erts_smp_atomic_read_nob(&erts_copy_literal_area__))
+
#ifdef ERTS_NEW_PURGE_STRATEGY
extern Process *erts_literal_area_collector;
#endif
@@ -1107,7 +1110,7 @@ typedef struct {
#define INITIALIZE_SHCOPY(info) \
do { \
- ErtsLiteralArea *larea__ = erts_copy_literal_area; \
+ ErtsLiteralArea *larea__ = ERTS_COPY_LITERAL_AREA();\
info.queue_start = info.queue_default; \
info.bitstore_start = info.bitstore_default; \
info.shtable_start = info.shtable_default; \
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 85647b8500..6786657faf 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -102,6 +102,7 @@ erts_heap_alloc(Process* p, Uint need, Uint xtra)
if (bp != NULL && need <= (bp->alloc_size - bp->used_size)) {
Eterm* ret = bp->mem + bp->used_size;
bp->used_size += need;
+ p->mbuf_sz += need;
return ret;
}
#ifdef DEBUG
@@ -124,7 +125,7 @@ erts_heap_alloc(Process* p, Uint need, Uint xtra)
MBUF(p) = bp;
bp->alloc_size = n;
bp->used_size = need;
- MBUF_SIZE(p) += n;
+ MBUF_SIZE(p) += need;
bp->off_heap.first = NULL;
bp->off_heap.overhead = 0;
return bp->mem;
diff --git a/erts/emulator/sys/common/erl_poll.c b/erts/emulator/sys/common/erl_poll.c
index e394d84f73..b8a28bcc18 100644
--- a/erts/emulator/sys/common/erl_poll.c
+++ b/erts/emulator/sys/common/erl_poll.c
@@ -75,6 +75,7 @@
#include "erl_driver.h"
#include "erl_alloc.h"
#include "erl_msacc.h"
+#include "erl_misc_utils.h"
#if !defined(ERTS_POLL_USE_EPOLL) \
&& !defined(ERTS_POLL_USE_DEVPOLL) \
@@ -2132,16 +2133,19 @@ get_timeout(ErtsPollSet ps,
if (timeout > (ErtsMonotonicTime) INT_MAX)
timeout = (ErtsMonotonicTime) INT_MAX;
save_timeout_time += ERTS_MSEC_TO_MONOTONIC(timeout);
+ timeout -= ERTS_PREMATURE_TIMEOUT(timeout, 1000);
break;
case 1000000:
/* Round up to nearest even micro second */
timeout = ERTS_MONOTONIC_TO_USEC(diff_time - 1) + 1;
save_timeout_time += ERTS_USEC_TO_MONOTONIC(timeout);
+ timeout -= ERTS_PREMATURE_TIMEOUT(timeout, 1000*1000);
break;
case 1000000000:
/* Round up to nearest even nano second */
timeout = ERTS_MONOTONIC_TO_NSEC(diff_time - 1) + 1;
save_timeout_time += ERTS_NSEC_TO_MONOTONIC(timeout);
+ timeout -= ERTS_PREMATURE_TIMEOUT(timeout, 1000*1000*1000);
break;
default:
ERTS_INTERNAL_ERROR("Invalid resolution");
@@ -2452,7 +2456,15 @@ ERTS_POLL_EXPORT(erts_poll_wait)(ErtsPollSet ps,
}
#endif
- res = check_fd_events(ps, to, no_fds);
+ while (1) {
+ res = check_fd_events(ps, to, no_fds);
+ if (res != 0)
+ break;
+ if (to == ERTS_POLL_NO_TIMEOUT)
+ break;
+ if (erts_get_monotonic_time(NULL) >= timeout_time)
+ break;
+ }
woke_up(ps);
diff --git a/erts/emulator/sys/unix/erl_child_setup.c b/erts/emulator/sys/unix/erl_child_setup.c
index 6b9ddd8da4..69fc6c2879 100644
--- a/erts/emulator/sys/unix/erl_child_setup.c
+++ b/erts/emulator/sys/unix/erl_child_setup.c
@@ -348,7 +348,7 @@ child_error:
* for posterity. */
static void handle_sigchld(int sig) {
- int buff[2], res;
+ int buff[2], res, __preverrno = errno;
sys_sigblock(SIGCHLD);
@@ -362,6 +362,16 @@ static void handle_sigchld(int sig) {
}
sys_sigrelease(SIGCHLD);
+
+ /* We save and restore the original errno as otherwise
+ the thread we are running in may end up with an
+ unexpected errno. An example of when this happened
+ was when the select in main had gotten an EINTR but
+ before the errno was checked the signal handler
+ was called and set errno to ECHILD from waitpid
+ which caused erl_child_setup to abort as it does
+ not expect ECHILD to be set after select */
+ errno = __preverrno;
}
#if defined(__ANDROID__)
@@ -423,7 +433,7 @@ main(int argc, char *argv[])
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART | SA_NOCLDSTOP;
if (sigaction(SIGCHLD, &sa, 0) == -1) {
- perror(0);
+ perror(NULL);
exit(1);
}
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index 6fb86f6dda..089efec3e8 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -715,11 +715,13 @@ static RETSIGTYPE suspend_signal(void)
static RETSIGTYPE suspend_signal(int signum)
#endif
{
- int res;
- int buf[1];
- do {
- res = read(sig_suspend_fds[0], buf, sizeof(int));
- } while (res < 0 && errno == EINTR);
+ int res, buf[1], __errno = errno;
+ do {
+ res = read(sig_suspend_fds[0], buf, sizeof(int));
+ } while (res < 0 && errno == EINTR);
+
+ /* restore previous errno in case read changed it */
+ errno = __errno;
}
#endif /* #ifdef ERTS_SYS_SUSPEND_SIGNAL */
diff --git a/erts/emulator/test/hipe_SUITE.erl b/erts/emulator/test/hipe_SUITE.erl
index 3e682b8d88..a556b4ddc0 100644
--- a/erts/emulator/test/hipe_SUITE.erl
+++ b/erts/emulator/test/hipe_SUITE.erl
@@ -51,6 +51,9 @@ t_copy_literals(Config) when is_list(Config) ->
true = erlang:delete_module(literals),
true = erlang:purge_module(literals),
+ %% Give the literal collector some time to work...
+ receive after 2000 -> ok end,
+
%% check that the ex-literals are ok
[a,b,c] = ref_cell:call(PA, get),
{a,b,c} = ref_cell:call(PB, get),
diff --git a/erts/include/internal/erl_misc_utils.h b/erts/include/internal/erl_misc_utils.h
index a4a5d1d510..55566ddf74 100644
--- a/erts/include/internal/erl_misc_utils.h
+++ b/erts/include/internal/erl_misc_utils.h
@@ -56,4 +56,33 @@ int erts_map_win_error_to_errno(DWORD win_error);
int erts_get_last_win_errno(void);
#endif
+#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
+#define __DARWIN__ 1
+#endif
+
+/*
+ * ERTS_PREMATURE_TIMEOUT() expects time units
+ * 1000 (millisec), 1000000 (microsec), or
+ * 1000000000 (nanosec). Might not work properly
+ * otherwise.
+ */
+#undef ERTS_USE_PREMATURE_TIMEOUT
+#undef ERTS_PREMATURE_TIMEOUT
+
+#if defined(__DARWIN__)
+#define ERTS_USE_PREMATURE_TIMEOUT 1
+#define ERTS_PREMATURE_TIMEOUT(TMO, TU) \
+ ((TMO) >= 1 * ((TU) / 1000) \
+ ? ((TMO) >= 20 * ((TU) / 1000) \
+ ? 15 * ((TU) / 1000) \
+ : ((TMO) >= 5 * ((TU) / 1000) \
+ ? 3 * ((TU) / 1000) \
+ : 5 * ((TU) / 10000))) \
+ : 0)
+
+#else
+#define ERTS_USE_PREMATURE_TIMEOUT 0
+#define ERTS_PREMATURE_TIMEOUT(TMO, TU) (0)
+#endif
+
#endif /* #ifndef ERL_MISC_UTILS_H_ */
diff --git a/erts/lib_src/pthread/ethr_event.c b/erts/lib_src/pthread/ethr_event.c
index eef88d5002..464875570a 100644
--- a/erts/lib_src/pthread/ethr_event.c
+++ b/erts/lib_src/pthread/ethr_event.c
@@ -184,6 +184,8 @@ return_event_on:
#include <errno.h>
#include <string.h>
+#include "erl_misc_utils.h"
+
#ifdef __DARWIN__
struct ethr_event_fdsets___ {
@@ -346,12 +348,9 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
ethr_sint32_t val;
int res, ulres;
int until_yield = ETHR_YIELD_AFTER_BUSY_LOOPS;
- ethr_sint64_t time = 0; /* SHUT UP annoying faulty warning... */
+ ethr_sint64_t time = 0;
#ifdef ETHR_HAVE_ETHR_GET_MONOTONIC_TIME
- ethr_sint64_t start = 0; /* SHUT UP annoying faulty warning... */
-#endif
-#ifdef ETHR_HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC
- struct timespec cond_timeout;
+ ethr_sint64_t timeout_time = 0; /* SHUT UP annoying faulty warning... */
#endif
val = ethr_atomic32_read(&e->state);
@@ -365,30 +364,27 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
if (timeout == 0)
return ETIMEDOUT;
else {
- time = timeout;
- switch (e->fd[0]) {
- case ETHR_EVENT_INVALID_FD__:
#ifdef ETHR_HAVE_ETHR_GET_MONOTONIC_TIME
- start = ethr_get_monotonic_time();
+ timeout_time = ethr_get_monotonic_time();
+ timeout_time += timeout;
#endif
+ switch (e->fd[0]) {
+ case ETHR_EVENT_INVALID_FD__:
+ time = timeout;
setup_nonblocking_pipe(e);
break;
#ifdef ETHR_HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC
case ETHR_EVENT_COND_TIMEDWAIT__:
- time += ethr_get_monotonic_time();
- cond_timeout.tv_sec = time / (1000*1000*1000);
- cond_timeout.tv_nsec = time % (1000*1000*1000);
+ time = -1;
if (spincount == 0)
goto set_event_off_waiter;
break;
#endif
default:
+ time = timeout;
/* Already initialized pipe... */
if (spincount == 0)
goto set_select_timeout;
-#ifdef ETHR_HAVE_ETHR_GET_MONOTONIC_TIME
- start = ethr_get_monotonic_time();
-#endif
break;
}
}
@@ -418,6 +414,9 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
|| e->fd[0] == ETHR_EVENT_COND_TIMEDWAIT__
#endif
) {
+#ifdef ETHR_HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC
+ struct timespec cond_timeout;
+#endif
set_event_off_waiter:
@@ -446,9 +445,35 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
#ifdef ETHR_HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC
if (timeout > 0) {
+ if (time != timeout_time) {
+ time = timeout_time;
+
+#if ERTS_USE_PREMATURE_TIMEOUT
+ {
+ ethr_sint64_t rtmo;
+
+ rtmo = timeout_time - ethr_get_monotonic_time();
+ if (rtmo <= 0) {
+ res = ETIMEDOUT;
+ break;
+ }
+ time = timeout_time;
+ time -= ERTS_PREMATURE_TIMEOUT(rtmo, 1000*1000*1000);
+ }
+#endif
+
+ cond_timeout.tv_sec = time / (1000*1000*1000);
+ cond_timeout.tv_nsec = time % (1000*1000*1000);
+ }
res = pthread_cond_timedwait(&e->cnd, &e->mtx, &cond_timeout);
- if (res == EINTR || res == ETIMEDOUT)
+ if (res == EINTR
+ || (res == ETIMEDOUT
+#if ERTS_USE_PREMATURE_TIMEOUT
+ && time == timeout_time
+#endif
+ )) {
break;
+ }
}
else
#endif
@@ -477,7 +502,11 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
struct timeval select_timeout;
#ifdef ETHR_HAVE_ETHR_GET_MONOTONIC_TIME
- time -= ethr_get_monotonic_time() - start;
+#if ERTS_USE_PREMATURE_TIMEOUT
+ restart_select:
+#endif
+
+ time = timeout_time - ethr_get_monotonic_time();
if (time <= 0)
return ETIMEDOUT;
#endif
@@ -492,6 +521,11 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
*/
time = ((time - 1) / 1000) + 1;
+#if defined(ETHR_HAVE_ETHR_GET_MONOTONIC_TIME) \
+ && ERTS_USE_PREMATURE_TIMEOUT
+ time -= ERTS_PREMATURE_TIMEOUT(time, 1000*1000);
+#endif
+
select_timeout.tv_sec = time / (1000*1000);
select_timeout.tv_usec = time % (1000*1000);
@@ -559,7 +593,11 @@ wait__(ethr_event *e, int spincount, ethr_sint64_t timeout)
val = ethr_atomic32_read(&e->state);
if (val == ETHR_EVENT_ON__)
goto return_event_on;
-
+#if defined(ETHR_HAVE_ETHR_GET_MONOTONIC_TIME) \
+ && ERTS_USE_PREMATURE_TIMEOUT
+ if (res == ETIMEDOUT)
+ goto restart_select; /* Verify timeout */
+#endif
}
return res;