diff options
author | Sverker Eriksson <[email protected]> | 2018-07-11 22:10:14 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-07-11 22:10:14 +0200 |
commit | 97626fffd082904576efbdad3e437720525d5fc2 (patch) | |
tree | d95e1b2ce2cd02122016c4ddf41c6950ddde8b08 /erts | |
parent | f138bdd545d90689a610a70cd982bb99d9c57903 (diff) | |
parent | 0c63aea9fe16372d827c93fc553148a7c92b9329 (diff) | |
download | otp-97626fffd082904576efbdad3e437720525d5fc2.tar.gz otp-97626fffd082904576efbdad3e437720525d5fc2.tar.bz2 otp-97626fffd082904576efbdad3e437720525d5fc2.zip |
Merge branch 'sverker/erts/monitored_by-docs/ERL-648/OTP-15180' into maint
* sverker/erts/monitored_by-docs/ERL-648/OTP-15180:
os_mon: Fix volatile test cpu_sup_SUITE:util_api
erts: Fix spec and docs for process_info 'monitored_by'
Diffstat (limited to 'erts')
-rw-r--r-- | erts/doc/src/erl_nif.xml | 2 | ||||
-rw-r--r-- | erts/doc/src/erlang.xml | 15 | ||||
-rw-r--r-- | erts/preloaded/src/erlang.erl | 8 |
3 files changed, 17 insertions, 8 deletions
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index a8eff43623..0fff8f7cad 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -194,7 +194,7 @@ ok <p>Binaries are sequences of whole bytes. Bitstrings with an arbitrary bit length have no support yet.</p> </item> - <tag>Resource objects</tag> + <tag><marker id="resource_objects"/>Resource objects</tag> <item> <p>The use of resource objects is a safe way to return pointers to native data structures from a NIF. A resource object is diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 73800687b7..8e014c3010 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -197,6 +197,15 @@ </desc> </datatype> + <datatype> + <name name="nif_resource"></name> + <desc> + <p>An opaque handle identifing a + <seealso marker="erl_nif#resource_objects">NIF resource object + </seealso>.</p> + </desc> + </datatype> + </datatypes> <funcs> @@ -5288,10 +5297,10 @@ RealSystem = system + MissedSystem</code> <p><c><anno>MinBinVHeapSize</anno></c> is the minimum binary virtual heap size for the process.</p> </item> - <tag><c>{monitored_by, <anno>Pids</anno>}</c></tag> + <tag><c>{monitored_by, <anno>MonitoredBy</anno>}</c></tag> <item> - <p>A list of process identifiers monitoring the process (with - <c>monitor/2</c>).</p> + <p>A list of identifiers for all the processes, ports and NIF + resources, that are monitoring the process.</p> </item> <tag><c>{monitors, <anno>Monitors</anno>}</c></tag> <item> diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index 75f6901258..1ed6b6b284 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -86,15 +86,15 @@ | 'nano_seconds'. -opaque prepared_code() :: reference(). - -export_type([prepared_code/0]). --opaque dist_handle() :: atom(). +-opaque nif_resource() :: reference(). +-export_type([nif_resource/0]). +-opaque dist_handle() :: atom(). -export_type([dist_handle/0]). -type iovec() :: [binary()]. - -export_type([iovec/0]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -2316,7 +2316,7 @@ process_flag(_Flag, _Value) -> {min_heap_size, MinHeapSize :: non_neg_integer()} | {min_bin_vheap_size, MinBinVHeapSize :: non_neg_integer()} | {max_heap_size, MaxHeapSize :: max_heap_size()} | - {monitored_by, Pids :: [pid()]} | + {monitored_by, MonitoredBy :: [pid() | port() | nif_resource()]} | {monitors, Monitors :: [{process | port, Pid :: pid() | port() | {RegName :: atom(), Node :: node()}}]} | |