FIFO in and out indices should be volatile.

Later code revealed that the receiving core never notices (reads anew) the _in member variable when waiting for the FIFO to be empty (_in == _out).
This commit is contained in:
Jared Boone 2016-01-07 10:53:27 -08:00
parent 7710b2d1fa
commit 8fba47b7d8

View File

@ -201,8 +201,8 @@ private:
} }
T _data[size()]; T _data[size()];
size_t _in; volatile size_t _in;
size_t _out; volatile size_t _out;
}; };
#endif/*__FIFO_H__*/ #endif/*__FIFO_H__*/