From 7d22a343fc920163744113f41cb7e040271bfd54 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Wed, 1 Aug 2018 09:03:05 +0200 Subject: [PATCH] subscriber threads in pubsub have no need for a timeout ... and periodic wakeups for no good reason are bad for power management Signed-off-by: Erik Boasson --- src/tools/pubsub/pubsub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/pubsub/pubsub.c b/src/tools/pubsub/pubsub.c index c3058cd..6067fa0 100755 --- a/src/tools/pubsub/pubsub.c +++ b/src/tools/pubsub/pubsub.c @@ -1640,7 +1640,6 @@ static uint32_t subthread(void *vspec) { void **mseq = (void **) dds_alloc(sizeof(void*) * (spec->read_maxsamples)); dds_sample_info_t *iseq = (dds_sample_info_t *) dds_alloc(sizeof(dds_sample_info_t) * spec->read_maxsamples); - dds_duration_t timeout = (uint64_t)100000000; dds_attach_t *xs = dds_alloc(sizeof(dds_attach_t) * nxs); dds_time_t tstart = 0, tfirst = 0, tprint = 0; @@ -1661,7 +1660,7 @@ static uint32_t subthread(void *vspec) { if (spec->polling) { dds_sleepfor(DDS_MSECS(1)); /* 1ms sleep interval, so a bit less than 1kHz poll freq */ } else { - rc = dds_waitset_wait(ws, xs, nxs, timeout); + rc = dds_waitset_wait(ws, xs, nxs, DDS_INFINITY); if (rc < DDS_RETCODE_OK) { printf ("wait: error %d\n", (int) rc); break;