
17 Feb
2004
17 Feb
'04
9:33 a.m.
Michael Glassford wrote:
One potential problem that I am aware of is that it is possible for the m_generation counter (see barrier.cpp) to overflow on systems that detect overflow of integer addition instead of wrapping (I assume there are such systems though I've never used one). Is it worthwhile checking for this and forcing wrapping in code?
I think that barrier will work just fine with a binary flag, as opposed to integer generation counter. In which case you can do flag = !flag; or m_generation = (m_generation + 1) % 2; Which would be simpler that checking for overflow on maximum integer value. It's still interesting to know if processors which trap on overflow exists nowdays... - Volodya