rework spinlock data structure to survive gcc -O3 optimization