hpcc-systems/HPCC-Platform — pull request #1216 by richardkchapman (2012-01-11 16:26:53+00:00)
Title: Non-reentrant spinlock inefficient

The non-reentrant spinlock is supposed to be faster than the general-purpose
SpinLock class (but only suitable for uses where no thread attempts to use
a lock it already owns). Unfortunately it seems that it was slower.

The addition of __sync_synchronize calls was necessary to fix a bug when
using __sync_xchg (which is not considered to be a full barrier), but
they are NOT needed when using __sync_compare_and_swap which therefore
ends up faster.

Signed-off-by: Richard Chapman