diff options
author | Sverker Eriksson <[email protected]> | 2015-11-13 16:47:40 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-04-07 18:41:47 +0200 |
commit | bf0bf9cf009fa8ccc7fc364fdbbdeb6f491efe43 (patch) | |
tree | 5a2a9f992a52758de4a7fef8c066fbf92ee022c4 /erts/emulator/beam/erl_node_tables.c | |
parent | 8015b8d46ff38fc05cac9cf8df9a37b5580e8909 (diff) | |
download | otp-bf0bf9cf009fa8ccc7fc364fdbbdeb6f491efe43.tar.gz otp-bf0bf9cf009fa8ccc7fc364fdbbdeb6f491efe43.tar.bz2 otp-bf0bf9cf009fa8ccc7fc364fdbbdeb6f491efe43.zip |
erts: Support 32-bit creation for external pid,port,refs
from future nodes.
Diffstat (limited to 'erts/emulator/beam/erl_node_tables.c')
-rw-r--r-- | erts/emulator/beam/erl_node_tables.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/erts/emulator/beam/erl_node_tables.c b/erts/emulator/beam/erl_node_tables.c index 8617f42d7b..79da705e0f 100644 --- a/erts/emulator/beam/erl_node_tables.c +++ b/erts/emulator/beam/erl_node_tables.c @@ -497,31 +497,7 @@ node_table_hash(void *venp) Uint32 cre = ((ErlNode *) venp)->creation; HashValue h = atom_tab(atom_val(((ErlNode *) venp)->sysname))->slot.bucket.hvalue; - h *= PRIME0; - h += cre & 0xff; - -#if MAX_CREATION >= (1 << 8) - h *= PRIME1; - h += (cre >> 8) & 0xff; -#endif - -#if MAX_CREATION >= (1 << 16) - h *= PRIME2; - h += (cre >> 16) & 0xff; -#endif - -#if MAX_CREATION >= (1 << 24) - h *= PRIME3; - h += (cre >> 24) & 0xff; -#endif - -#if 0 -/* XXX Problems in older versions of GCC */ - #if MAX_CREATION >= (1UL << 32) - #error "MAX_CREATION larger than size of expected creation storage (Uint32)" - #endif -#endif - return h; + return (h + cre) * PRIME0; } static int @@ -599,7 +575,7 @@ erts_node_table_info(int to, void *to_arg) } -ErlNode *erts_find_or_insert_node(Eterm sysname, Uint creation) +ErlNode *erts_find_or_insert_node(Eterm sysname, Uint32 creation) { ErlNode *res; ErlNode ne; |