Unified key-to-iid map means a backref to the map is no longer needed
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
		
							parent
							
								
									96da0c5555
								
							
						
					
					
						commit
						e0d5587639
					
				
					 2 changed files with 1 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -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;
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue