aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-02-26 20:40:51 +0100
committerSverker Eriksson <[email protected]>2018-03-02 19:16:48 +0100
commit7fb3ed7d2731050186eb5224fe8e6050e4909341 (patch)
treead655e7b9c7d5480065d7cd1579307baa08fcac4 /lib/kernel
parent2709c93ede0be977ac13543d0fabe8ff3c27f4cc (diff)
downloadotp-7fb3ed7d2731050186eb5224fe8e6050e4909341.tar.gz
otp-7fb3ed7d2731050186eb5224fe8e6050e4909341.tar.bz2
otp-7fb3ed7d2731050186eb5224fe8e6050e4909341.zip
erts,kernel: Add dist_util:strict_order_flags/0
to replace DFLAGS_STRICT_ORDER_DELIVERY and remove that compile time dependency.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/include/dist.hrl5
-rw-r--r--lib/kernel/src/dist_util.erl9
2 files changed, 8 insertions, 6 deletions
diff --git a/lib/kernel/include/dist.hrl b/lib/kernel/include/dist.hrl
index 986aca6c26..b7c35712a6 100644
--- a/lib/kernel/include/dist.hrl
+++ b/lib/kernel/include/dist.hrl
@@ -42,10 +42,5 @@
-define(DFLAG_BIG_CREATION, 16#40000).
-define(DFLAG_SEND_SENDER, 16#80000).
-%% DFLAGs that require strict ordering or:ed together...
--define(DFLAGS_STRICT_ORDER_DELIVERY,
- ?DFLAG_DIST_HDR_ATOM_CACHE).
-
-
%% Also update dflag2str() in ../src/dist_util.erl
%% when adding flags...
diff --git a/lib/kernel/src/dist_util.erl b/lib/kernel/src/dist_util.erl
index 5614b80802..3927b64b06 100644
--- a/lib/kernel/src/dist_util.erl
+++ b/lib/kernel/src/dist_util.erl
@@ -27,6 +27,7 @@
%%-compile(export_all).
-export([handshake_we_started/1, handshake_other_started/1,
+ strict_order_flags/0,
start_timer/1, setup_timer/2,
reset_timer/1, cancel_timer/1,
shutdown/3, shutdown/4]).
@@ -135,9 +136,15 @@ publish_flag(_, OtherNode) ->
default, % flags erts prefers
mandatory, % flags erts needs
addable, % flags local dist implementation is allowed to add
- rejectable % flags local dist implementation is allowed to reject
+ rejectable, % flags local dist implementation is allowed to reject
+ strict_order % flags for features needing strict order delivery
}).
+-spec strict_order_flags() -> integer().
+strict_order_flags() ->
+ EDF = erts_internal:get_dflags(),
+ EDF#erts_dflags.strict_order.
+
make_this_flags(RequestType, AddFlags, RejectFlags, OtherNode,
#erts_dflags{}=EDF) ->
case RejectFlags band (bnot EDF#erts_dflags.rejectable) of