check should be before and after the push or pull

This commit is contained in:
Dhanya Maliakal 2017-08-21 09:24:26 +02:00
parent f78a7b201b
commit 03d9e1d182

View File

@ -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) {