aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_node_tables.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-04-12 18:54:23 +0200
committerSverker Eriksson <[email protected]>2016-04-12 18:54:23 +0200
commit0f8f4e96ff8479018e5e921775654adc15f5e771 (patch)
tree33554de3cf013e6df61977bb5af4cd409197583f /erts/emulator/beam/erl_node_tables.c
parent5b31b2196bbb13ba650207f4ef94b2e1fa8f6121 (diff)
parente4b8b9be39601b1c79dfd5d8e807ae4c404b6935 (diff)
downloadotp-0f8f4e96ff8479018e5e921775654adc15f5e771.tar.gz
otp-0f8f4e96ff8479018e5e921775654adc15f5e771.tar.bz2
otp-0f8f4e96ff8479018e5e921775654adc15f5e771.zip
Merge branch 'sverk/big-external-creations.OTP-13488'
Diffstat (limited to 'erts/emulator/beam/erl_node_tables.c')
-rw-r--r--erts/emulator/beam/erl_node_tables.c28
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;