aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_node_tables.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-09-18 14:27:27 +0200
committerSverker Eriksson <[email protected]>2018-09-18 14:27:51 +0200
commita04f3246c1eda7b8d8d83ba2bcc46d502b80d22b (patch)
tree3e2d7553f7aab8007f55cc93c2151f7ec67f7e16 /erts/emulator/beam/erl_node_tables.h
parentd384fb7c6edd33161fa5d2c56745427da32e9aa5 (diff)
downloadotp-a04f3246c1eda7b8d8d83ba2bcc46d502b80d22b.tar.gz
otp-a04f3246c1eda7b8d8d83ba2bcc46d502b80d22b.tar.bz2
otp-a04f3246c1eda7b8d8d83ba2bcc46d502b80d22b.zip
Consolidate distribution entry state transitions
* Make connection_id part of the distribution handle as {ConnId, DistEntry} in order for BIFs to verify correct connection. * Make distribution handle opaque to net_kernel. * Remove some unsafe lockless reads of DistEntry.flags * Change state ERTS_DE_STATE_EXITING to be more of an internal state that prevents erts from enqueue, encode or schedule new data to be sent. Otherwise it should behave like ERTS_DE_STATE_CONNECTED.
Diffstat (limited to 'erts/emulator/beam/erl_node_tables.h')
-rw-r--r--erts/emulator/beam/erl_node_tables.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_node_tables.h b/erts/emulator/beam/erl_node_tables.h
index 9a792b10b1..c44f1f8991 100644
--- a/erts/emulator/beam/erl_node_tables.h
+++ b/erts/emulator/beam/erl_node_tables.h
@@ -214,9 +214,10 @@ int erts_lc_is_de_rwlocked(DistEntry *);
int erts_lc_is_de_rlocked(DistEntry *);
#endif
int erts_dist_entry_destructor(Binary *bin);
-DistEntry *erts_dhandle_to_dist_entry(Eterm dhandle);
-Eterm erts_build_dhandle(Eterm **hpp, ErlOffHeap*, DistEntry*);
-Eterm erts_make_dhandle(Process *c_p, DistEntry *dep);
+DistEntry *erts_dhandle_to_dist_entry(Eterm dhandle, Uint32* connection_id);
+#define ERTS_DHANDLE_SIZE (3+ERTS_MAGIC_REF_THING_SIZE)
+Eterm erts_build_dhandle(Eterm **hpp, ErlOffHeap*, DistEntry*, Uint32 conn_id);
+Eterm erts_make_dhandle(Process *c_p, DistEntry*, Uint32 conn_id);
ERTS_GLB_INLINE void erts_deref_node_entry(ErlNode *np);
ERTS_GLB_INLINE void erts_de_rlock(DistEntry *dep);