Reverted lack of spin precheck.
Added memory ordering to all atomics.