aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-02-23 12:32:00 +0100
committerGitHub <[email protected]>2018-02-23 12:32:00 +0100
commit897c82097348b33383e62bcf0ecc236132d7a2cc (patch)
treebf4648fec5f7dc1f5defed5cfd44bcce204964e1 /lib/stdlib/src
parent5faf147cfe27da707059c61ae1e284c10987565a (diff)
parent3e14c0e9f81e34c78c609da4b77c32d208a34d93 (diff)
downloadotp-897c82097348b33383e62bcf0ecc236132d7a2cc.tar.gz
otp-897c82097348b33383e62bcf0ecc236132d7a2cc.tar.bz2
otp-897c82097348b33383e62bcf0ecc236132d7a2cc.zip
Merge pull request #1723 from jhogberg/john/erts/ets-whereis/OTP-14884
Add ets:whereis/1 for resolving table names -> tid()
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/ets.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl
index 039ab45868..6a559f0be5 100644
--- a/lib/stdlib/src/ets.erl
+++ b/lib/stdlib/src/ets.erl
@@ -73,7 +73,8 @@
select_count/2, select_delete/2, select_replace/2, select_reverse/1,
select_reverse/2, select_reverse/3, setopts/2, slot/2,
take/2,
- update_counter/3, update_counter/4, update_element/3]).
+ update_counter/3, update_counter/4, update_element/3,
+ whereis/1]).
%% internal exports
-export([internal_request_all/0]).
@@ -145,6 +146,7 @@ give_away(_, _, _) ->
InfoList :: [InfoTuple],
InfoTuple :: {compressed, boolean()}
| {heir, pid() | none}
+ | {id, tid()}
| {keypos, pos_integer()}
| {memory, non_neg_integer()}
| {name, atom()}
@@ -162,7 +164,7 @@ info(_) ->
-spec info(Tab, Item) -> Value | undefined when
Tab :: tab(),
- Item :: compressed | fixed | heir | keypos | memory
+ Item :: compressed | fixed | heir | id | keypos | memory
| name | named_table | node | owner | protection
| safe_fixed | safe_fixed_monotonic_time | size | stats | type
| write_concurrency | read_concurrency,
@@ -512,6 +514,11 @@ update_counter(_, _, _, _) ->
update_element(_, _, _) ->
erlang:nif_error(undef).
+-spec whereis(TableName) -> tid() | undefined when
+ TableName :: atom().
+whereis(_) ->
+ erlang:nif_error(undef).
+
%%% End of BIFs
-opaque comp_match_spec() :: reference().