7#ifndef __KIS_CACHE_STATE_VALUE_H
8#define __KIS_CACHE_STATE_VALUE_H
35 }
while(!
m_value.testAndSetOrdered(oldValue, newValue));
62 }
while(!
m_value.testAndSetOrdered(oldValue, newValue));
74 if (oldValue == seq) {
79 }
while(!
m_value.testAndSetOrdered(oldValue, newValue));
115 bool isValid =
false;
137 bool isValid =
false;
164template <
typename T,
typename Mode>
184 bool isValid =
false;
192 isValid &= savedMode == mode;
210 bool isValid =
false;
218 isValid &= savedMode == mode;
float value(const T *src, size_t ch)
int incrementSeqNo(int value)
bool endRead(int seq) const
static const int SeqNoMask
static const int SeqNoIncrement
static const int IsValidMask
static const int WritersCountMask
static const int WritersCountIncrement
bool startWrite(int *seq)
bool startRead(int *seq) const
T getValue(Mode mode) const
bool tryGetValue(T &result, Mode mode) const
virtual ~KisLockFreeCacheWithModeConsistency()
KisCacheStateValue m_state
virtual T calculateNewValue() const =0
virtual ~KisLockFreeCache()
bool tryGetValue(T &result) const
virtual T calculateNewValue() const =0
KisCacheStateValue m_state