Made Get volatile

This commit is contained in:
Geoffrey Merck 2020-05-10 08:01:10 +02:00
parent 2b3df4e901
commit 0b31c40c2b
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ public:
bool put(TDATATYPE item) volatile;
bool get(TDATATYPE& item);
bool get(TDATATYPE& item) volatile;
TDATATYPE peek() const;

View File

@ -80,7 +80,7 @@ template <typename TDATATYPE> TDATATYPE CRingBuffer<TDATATYPE>::peek() const
return m_buffer[m_tail];
}
template <typename TDATATYPE> bool CRingBuffer<TDATATYPE>::get(TDATATYPE& item)
template <typename TDATATYPE> bool CRingBuffer<TDATATYPE>::get(TDATATYPE& item) volatile
{
if (m_head == m_tail && !m_full)
return false;