Skip to content

Commit 7249200

Browse files
Update samples from iox_queue to reader history cache in the
read/take_impl APIs when SHM is supported and iox_listener is not attached to a specific reader Signed-off-by: Sumanth Nirmal <[email protected]>
1 parent e591d48 commit 7249200

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/core/ddsc/src/dds_read.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ static dds_return_t dds_read_impl (bool take, dds_entity_t reader_or_condition,
6464

6565
thread_state_awake (ts1, &entity->m_domain->gv);
6666

67+
#ifdef DDS_HAS_SHM
68+
// If SHM is supported and if the monitor is not attached
69+
if(rd->m_iox_sub && !rd->m_iox_sub_context.monitor) {
70+
// transfer the samples from iox to rhc in the same thread context
71+
dds_transfer_samples_from_iox_to_rhc(rd);
72+
}
73+
#endif
74+
6775
/* Allocate samples if not provided (assuming all or none provided) */
6876
if (buf[0] == NULL)
6977
{
@@ -163,6 +171,13 @@ static dds_return_t dds_readcdr_impl (bool take, dds_entity_t reader_or_conditio
163171
}
164172

165173
thread_state_awake (ts1, &entity->m_domain->gv);
174+
#ifdef DDS_HAS_SHM
175+
// If SHM is supported and if the monitor is not attached
176+
if(rd->m_iox_sub && !rd->m_iox_sub_context.monitor) {
177+
// transfer the samples from iox to rhc in the same thread context
178+
dds_transfer_samples_from_iox_to_rhc(rd);
179+
}
180+
#endif
166181

167182
/* read/take resets data available status -- must reset before reading because
168183
the actual writing is protected by RHC lock, not by rd->m_entity.m_lock */

0 commit comments

Comments
 (0)