From 03d9e1d182e8aa0eeed306eb2a71c9a8d6d1fb67 Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Mon, 21 Aug 2017 09:24:26 +0200 Subject: [PATCH] check should be before and after the push or pull --- slsReceiverSoftware/src/Fifo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/slsReceiverSoftware/src/Fifo.cpp b/slsReceiverSoftware/src/Fifo.cpp index 9f46788e0..c59dcfd56 100644 --- a/slsReceiverSoftware/src/Fifo.cpp +++ b/slsReceiverSoftware/src/Fifo.cpp @@ -108,6 +108,9 @@ void Fifo::GetNewAddress(char*& address) { if (temp < status_fifoFree) status_fifoFree = temp; fifoFree->pop(address); + temp = fifoFree->getSemValue(); + if (temp < status_fifoFree) + status_fifoFree = temp; } void Fifo::PushAddress(char*& address) { @@ -115,6 +118,9 @@ void Fifo::PushAddress(char*& address) { if (temp > status_fifoBound) status_fifoBound = temp; while(!fifoBound->push(address)); + temp = fifoBound->getSemValue(); + if (temp > status_fifoBound) + status_fifoBound = temp; } void Fifo::PopAddress(char*& address) {