Skip to content

Commit fdf0394

Browse files
authored
Merge PR-10989 from sverker/erts/native-record-dist-flag
erts: Add distribution capability flag DFLAG_NATIVE_RECORDS
2 parents fe562f1 + e1c052a commit fdf0394

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

erts/doc/guides/erl_dist_protocol.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,11 @@ following capability flags are defined:
833833
[`ALTACT_SIG_SEND`](erl_dist_protocol.md#ALTACT_SIG_SEND) control messages.
834834
Introduced in OTP 28.
835835

836+
- **`-define(DFLAG_NATIVE_RECORDS, (1 bsl 38)).`{: #DFLAG_NATIVE_RECORDS }** -
837+
The node supports native record terms encoded with the
838+
[`RECORD_EXT`](erl_ext_dist.md#record_ext) tag.
839+
Introduced in OTP 29.
840+
836841
There is also function `dist_util:strict_order_flags/0` returning all flags
837842
(bitwise or:ed together) corresponding to features that require strict ordering
838843
of data over distribution channels.

erts/emulator/beam/dist.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#define DFLAG_ALIAS (((Uint64)0x8) << 32)
6868
#define DFLAG_LOCAL_EXT (((Uint64)0x10) << 32) /* internal */
6969
#define DFLAG_ALTACT_SIG (((Uint64)0x20) << 32)
70+
#define DFLAG_NATIVE_RECORDS (((Uint64)0x40) << 32)
7071

7172
/*
7273
* In term_to_binary/2, we will use DFLAG_ATOM_CACHE to mean
@@ -105,7 +106,8 @@
105106
| DFLAG_DIST_MONITOR_NAME \
106107
| DFLAG_SPAWN \
107108
| DFLAG_ALTACT_SIG \
108-
| DFLAG_ALIAS)
109+
| DFLAG_ALIAS \
110+
| DFLAG_NATIVE_RECORDS)
109111

110112
/* Our preferred set of flags. Used for connection setup handshake */
111113
#define DFLAG_DIST_DEFAULT (DFLAG_DIST_MANDATORY | DFLAG_DIST_HOPEFULLY \

lib/kernel/include/dist.hrl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
-define(DFLAG_ALIAS, (16#08 bsl 32)).
6060
-define(DFLAG_LOCAL_EXT, (16#10 bsl 32)). %% only used internally
6161
-define(DFLAG_ALTACT_SIG, (16#20 bsl 32)).
62+
-define(DFLAG_NATIVE_RECORDS, (16#40 bsl 32)).
6263

6364
%% The following flags are mandatory in OTP 25. OTP 25 and higher
6465
%% will accept ?DFLAG_MANDATORY_25_DIGEST as a shorthand for all those

lib/kernel/src/dist_util.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ dflag2str(?DFLAG_LOCAL_EXT) ->
136136
"LOCAL_EXT";
137137
dflag2str(?DFLAG_ALTACT_SIG) ->
138138
"ALTACT_SIG";
139+
dflag2str(?DFLAG_NATIVE_RECORDS) ->
140+
"NATIVE_RECORDS";
139141
dflag2str(Other) ->
140142
lists:flatten(io_lib:format("UNKNOWN<~.16.0B>", [Other])).
141143

0 commit comments

Comments
 (0)