From e0d55876394f7faa39a55fa39b72c1092597638d Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Sun, 30 Dec 2018 09:50:23 +0100 Subject: [PATCH] Unified key-to-iid map means a backref to the map is no longer needed Signed-off-by: Erik Boasson --- src/core/ddsi/include/ddsi/ddsi_tkmap.h | 1 - src/core/ddsi/src/ddsi_tkmap.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/ddsi/include/ddsi/ddsi_tkmap.h b/src/core/ddsi/include/ddsi/ddsi_tkmap.h index 2e712b7..225db9f 100644 --- a/src/core/ddsi/include/ddsi/ddsi_tkmap.h +++ b/src/core/ddsi/include/ddsi/ddsi_tkmap.h @@ -26,7 +26,6 @@ struct dds_topic; struct ddsi_tkmap_instance { struct ddsi_serdata * m_sample; - struct ddsi_tkmap * m_map; uint64_t m_iid; os_atomic_uint32_t m_refc; }; diff --git a/src/core/ddsi/src/ddsi_tkmap.c b/src/core/ddsi/src/ddsi_tkmap.c index 324ac20..725814d 100644 --- a/src/core/ddsi/src/ddsi_tkmap.c +++ b/src/core/ddsi/src/ddsi_tkmap.c @@ -189,7 +189,6 @@ retry: return NULL; tk->m_sample = ddsi_serdata_to_topicless (sd); - tk->m_map = map; os_atomic_st32 (&tk->m_refc, 1); tk->m_iid = ddsi_iid_gen (); if (!ut_chhAdd (map->m_hh, tk)) @@ -235,7 +234,7 @@ void ddsi_tkmap_instance_unref (_In_ struct ddsi_tkmap_instance * tk) } while (!os_atomic_cas32(&tk->m_refc, old, new)); if (new == REFC_DELETE) { - struct ddsi_tkmap *map = tk->m_map; + struct ddsi_tkmap *map = gv.m_tkmap; /* Remove from hash table */ int removed = ut_chhRemove(map->m_hh, tk);