I haven't done a complete review, but I think at least one change is
warranted.
fifo->out is read (correctly with atomic_load_explicit), but never
written in streamer_user.c . So I can't see how an atomic load would be
required in streamer.c.
diff --git a/src/hal/components/streamer.c b/src/hal/components/streamer.c
index 256c230..1fa7620 100644
--- a/src/hal/components/streamer.c
+++ b/src/hal/components/streamer.c
@@ -241,7 +241,7 @@ static void update(void *arg, long period)
dptr = (shmem_data_t *)(fifo+1);
/* find the next block of data in the fifo */
tmpin = atomic_load_explicit(&fifo->in, memory_order_acquire);
- tmpout = atomic_load_explicit(&fifo->out, memory_order_acquire);
+ tmpout = fifo->out;
if ( tmpout == tmpin ) {
/* fifo empty - log it */
*(str->empty) = 1;
--
Chris Lesiak
Principal Design Engineer, Software
LI-COR, Inc.
[email protected]
Any opinions expressed are those of the author and
do not necessarily represent those of his employer.
------------------------------------------------------------------------------
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers