diff options
author | Rickard Green <rickard@erlang.org> | 2023-04-29 00:30:12 +0200 |
---|---|---|
committer | Rickard Green <rickard@erlang.org> | 2023-04-29 00:59:16 +0200 |
commit | 330b119be68f95f6f8fbdef8bf16bba314783973 (patch) | |
tree | f78d545d1f7f2ff98410150028981f14e9f527b5 /erts/emulator/beam/erl_node_tables.h | |
parent | 3002f55f409f44122d3a45ac53bfd453e9aa2cb2 (diff) | |
download | erlang-330b119be68f95f6f8fbdef8bf16bba314783973.tar.gz |
[erts] ensure no mix of external and internal identifiers
Silently reject proposed creation and select another one when a node goes
alive if there are external identifiers in the system with the proposed
creation and the same node name that are to be used. Such identifiers would
not work as expected in various situations, and are not from the instance of
the node that are about to go alive.
Diffstat (limited to 'erts/emulator/beam/erl_node_tables.h')
-rw-r--r-- | erts/emulator/beam/erl_node_tables.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_node_tables.h b/erts/emulator/beam/erl_node_tables.h index 937bfb1d9e..c3ee2eaa36 100644 --- a/erts/emulator/beam/erl_node_tables.h +++ b/erts/emulator/beam/erl_node_tables.h @@ -258,6 +258,7 @@ void erts_set_dist_entry_not_connected(DistEntry *); void erts_set_dist_entry_pending(DistEntry *); void erts_set_dist_entry_connected(DistEntry *, Eterm, Uint64); ErlNode *erts_find_or_insert_node(Eterm, Uint32, Eterm); +ErlNode *erts_find_node(Eterm, Uint32); void erts_schedule_delete_node(ErlNode *); void erts_set_this_node(Eterm, Uint32); Uint erts_node_table_size(void); @@ -285,6 +286,7 @@ ERTS_GLB_INLINE void erts_deref_node_entry__(ErlNode *np, Eterm term, char *file ERTS_GLB_INLINE erts_aint_t erts_ref_node_entry(ErlNode *np, int min_val, Eterm term); ERTS_GLB_INLINE void erts_deref_node_entry(ErlNode *np, Eterm term); #endif +ERTS_GLB_INLINE erts_aint_t erts_node_refc(ErlNode *np); ERTS_GLB_INLINE void erts_de_rlock(DistEntry *dep); ERTS_GLB_INLINE void erts_de_runlock(DistEntry *dep); ERTS_GLB_INLINE void erts_de_rwlock(DistEntry *dep); @@ -335,6 +337,12 @@ erts_deref_node_entry(ErlNode *np, Eterm term) erts_schedule_delete_node(np); } +ERTS_GLB_INLINE erts_aint_t +erts_node_refc(ErlNode *np) +{ + return erts_refc_read(&np->refc, 0); +} + #endif ERTS_GLB_INLINE void |