Home Bug Reports

ice_atomic_exchange_add

vukicevicvukicevic Member Vladimir VukicevicOrganization: DUGProject: DUG Insight ✭✭
In IceUtil/Shared.h, the comments for ice_atomic_exchange_add at line 118 (1.2.0 release) indicate that it behaves the same as the windows InterlockedExchangeAdd function. However, the function returns tmp+i, i.e. the value of the atomic variable after the add. InterlockedExchangeAdd returns the value of the variable before the add (just tmp, in this case).

This probably isn't noticable, since the only place exchange_add seems to be used is to exchange_add(0, &t), but I'm not sure if it's a documentation bug or a small code bug.
Sign In or Register to comment.