mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 05:17:39 +00:00
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:
@@ -201,8 +201,8 @@ private:
|
||||
}
|
||||
|
||||
T _data[size()];
|
||||
size_t _in;
|
||||
size_t _out;
|
||||
volatile size_t _in;
|
||||
volatile size_t _out;
|
||||
};
|
||||
|
||||
#endif/*__FIFO_H__*/
|
||||
|
Reference in New Issue
Block a user