diff options
author | John Högberg <[email protected]> | 2018-02-21 12:57:25 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-02-22 10:23:14 +0100 |
commit | 8f3536583a6338e3a61dbf008d674f54a77e401c (patch) | |
tree | bb8f1a75ff06da9f3fa0515021d6632908e69fae /lib/stdlib/src | |
parent | 1540a0758b8d60af7b3832158015bd8cf64016af (diff) | |
download | otp-8f3536583a6338e3a61dbf008d674f54a77e401c.tar.gz otp-8f3536583a6338e3a61dbf008d674f54a77e401c.tar.bz2 otp-8f3536583a6338e3a61dbf008d674f54a77e401c.zip |
Add ets:whereis/1 for resolving table names -> tid()
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/ets.erl | 11 |
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(). |