aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/erts_internal.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-11-15 15:48:38 +0100
committerSverker Eriksson <[email protected]>2018-11-15 15:48:38 +0100
commitefe633d2c22daea6225935a2945fa5d3dd70e50c (patch)
tree7f111f09a6c261be777831578adb8aad6b970c9e /erts/preloaded/src/erts_internal.erl
parent870ff6a1ec52003b8b67d3bbfaf68a28184bd0b6 (diff)
parentfefb5d039e87ff7137e78b3d5f2eaf01e498ec4d (diff)
downloadotp-efe633d2c22daea6225935a2945fa5d3dd70e50c.tar.gz
otp-efe633d2c22daea6225935a2945fa5d3dd70e50c.tar.bz2
otp-efe633d2c22daea6225935a2945fa5d3dd70e50c.zip
Merge branch 'sverker/erts/atomics-counters/OTP-13468' into maint
* sverker/erts/atomics-counters/OTP-13468: erts: Add new module 'counters' erts: Add new module 'atomics'
Diffstat (limited to 'erts/preloaded/src/erts_internal.erl')
-rw-r--r--erts/preloaded/src/erts_internal.erl25
1 files changed, 25 insertions, 0 deletions
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index 63b786a473..d491a505c6 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -92,6 +92,11 @@
-export([erase_persistent_terms/0]).
+-export([atomics_new/2]).
+
+-export([counters_new/1, counters_get/2, counters_add/3,
+ counters_info/1]).
+
%%
%% Await result of send to port
%%
@@ -697,3 +702,23 @@ create_dist_channel(_Node, _DistCtrlr, _Flags, _Ver) ->
-spec erase_persistent_terms() -> 'ok'.
erase_persistent_terms() ->
erlang:nif_error(undefined).
+
+-spec atomics_new(pos_integer(), pos_integer()) -> reference().
+atomics_new(_Arity, _EncOpts) ->
+ erlang:nif_error(undef).
+
+-spec counters_new(pos_integer()) -> reference().
+counters_new(_Size) ->
+ erlang:nif_error(undef).
+
+-spec counters_get(reference(), pos_integer()) -> integer().
+counters_get(_Ref, _Ix) ->
+ erlang:nif_error(undef).
+
+-spec counters_add(reference(), pos_integer(), integer()) -> ok.
+counters_add(_Ref, _Ix, _Incr) ->
+ erlang:nif_error(undef).
+
+-spec counters_info(reference()) -> #{}.
+counters_info(_Ref) ->
+ erlang:nif_error(undef).