aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-10-19 17:35:51 +0200
committerSverker Eriksson <[email protected]>2018-10-23 12:36:29 +0200
commit43499e6ab183a44a979d4fb5c80b5a3603e1bbd9 (patch)
tree4d81fa3c955bf0de2b9f2c3fc46ea2bf9e375e51 /erts/emulator/beam
parent77d3d262c5e7d784204a6d91b79ed2f46b4013ad (diff)
downloadotp-43499e6ab183a44a979d4fb5c80b5a3603e1bbd9.tar.gz
otp-43499e6ab183a44a979d4fb5c80b5a3603e1bbd9.tar.bz2
otp-43499e6ab183a44a979d4fb5c80b5a3603e1bbd9.zip
erts: Fix lc_key in base nodes
to actually pass the copy to lock checker.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_db_catree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_db_catree.c b/erts/emulator/beam/erl_db_catree.c
index 072858f3f5..5069e1e531 100644
--- a/erts/emulator/beam/erl_db_catree.c
+++ b/erts/emulator/beam/erl_db_catree.c
@@ -855,7 +855,7 @@ DbTableCATreeNode* find_base_node(DbTableCATree* tb, Eterm key,
static ERTS_INLINE
-void copy_route_key(DbRouteKey* dst, Eterm key, Uint key_size)
+Eterm copy_route_key(DbRouteKey* dst, Eterm key, Uint key_size)
{
dst->size = key_size;
if (key_size != 0) {
@@ -870,6 +870,7 @@ void copy_route_key(DbRouteKey* dst, Eterm key, Uint key_size)
dst->term = key;
dst->oh = NULL;
}
+ return dst->term;
}
static ERTS_INLINE
@@ -914,7 +915,7 @@ static DbTableCATreeNode *create_base_node(DbTableCATree *tb,
rwmtx_opt.main_spincount = erts_ets_rwmtx_spin_count;
#ifdef ERTS_ENABLE_LOCK_CHECK
- copy_route_key(&p->u.base.lc_key, lc_key, lc_key_size);
+ lc_key = copy_route_key(&p->u.base.lc_key, lc_key, lc_key_size);
#endif
erts_rwmtx_init_opt(&p->u.base.lock, &rwmtx_opt,
"erl_db_catree_base_node",
@@ -1613,8 +1614,7 @@ static Eterm copy_iter_search_key(CATreeRootIterator* iter, Eterm key)
(offsetof(DbRouteKey, heap)
+ key_size*sizeof(Eterm)));
}
- copy_route_key(iter->search_key, key, key_size);
- return iter->search_key->term;
+ return copy_route_key(iter->search_key, key, key_size);
}
TreeDbTerm** catree_find_nextprev_root(CATreeRootIterator *iter, int next,