aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-05-22 18:01:23 +0200
committerSverker Eriksson <[email protected]>2019-05-22 18:01:23 +0200
commit55cee8416a689d3adf57fc0b20959c328f8c83bd (patch)
tree6db331d9e98973f3baccbc105300d487368a1cc4 /erts/doc/src
parent90b543e2415762df46a4eb2e5b8c7bf2c318f0f3 (diff)
parent7d54af059fffd27286f6a236470a9096c09921a9 (diff)
downloadotp-55cee8416a689d3adf57fc0b20959c328f8c83bd.tar.gz
otp-55cee8416a689d3adf57fc0b20959c328f8c83bd.tar.bz2
otp-55cee8416a689d3adf57fc0b20959c328f8c83bd.zip
Merge branch 'sverker/erts/system_monitor-doc/ERL-936' into maint
* sverker/erts/system_monitor-doc: erts: Add some erl_nif doc clarifications erts: Clarify erlang:system_monitor/2 semantics
Diffstat (limited to 'erts/doc/src')
-rw-r--r--erts/doc/src/erl_nif.xml7
-rw-r--r--erts/doc/src/erlang.xml12
2 files changed, 19 insertions, 0 deletions
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index f88d255296..d74ae23a93 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -1495,6 +1495,9 @@ enif_free_iovec(iovec);]]></code>
<c>term</c>.</p>
<p>Returns <c>true</c> on success, or <c>false</c> if <c>term</c> is
not a handle to a resource object of type <c>type</c>.</p>
+ <p><c>enif_get_resource</c> does not add a reference to the resource
+ object. However, the pointer received in <c>*objp</c> is guaranteed to
+ be valid at least as long as the resource handle <c>term</c> is valid.</p>
</desc>
</func>
@@ -2947,6 +2950,10 @@ enif_map_iterator_destroy(env, &amp;iter);</code>
References made by <seealso marker="#enif_make_resource">
<c>enif_make_resource</c></seealso>
can only be removed by the garbage collector.</p>
+ <p>There are no guarantees exactly when the destructor of an
+ unreferenced resource is called. It could be called directly by
+ <c>enif_release_resource</c> but it could also be scheduled to be
+ called at a later time possibly by another thread.</p>
</desc>
</func>
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 68cde567c2..f41ed87048 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -9413,6 +9413,18 @@ Metadata = #{ pid => pid(),
<p>Returns the previous system monitor settings just like
<seealso marker="#system_monitor/0">
<c>erlang:system_monitor/0</c></seealso>.</p>
+ <p>The arguments to <c>system_monitor/2</c> specifies how all
+ system monitoring on the node should be done, not how it should be
+ changed. This means only one process at a time
+ (<c><anno>MonitorPid</anno></c>) can be the receiver of system monitor
+ messages. Also, the way to clear a specific monitor option
+ is to not include it in the list <c><anno>Options</anno></c>. All
+ system monitoring will, however, be cleared if the process identified by
+ <c><anno>MonitorPid</anno></c> terminates.</p>
+ <p>There are no special option values (like zero) to clear an option.
+ Some of the options have a unspecified minimum value. Lower values
+ will be adjusted to the minimum value. For example, it is currently not
+ possible to monitor all garbage collections with <c>{long_gc, 0}</c>.</p>
<note>
<p>If a monitoring process gets so large that it itself
starts to cause system monitor messages when garbage