Fix barrier usage

* Accidentally used a write barrier when a read was needed.
* Placed all write barriers after the operation.
Fix example to always use uint64_t

For 32-bit builds the sum would wrap around and print a negative number.
This has been fixed.
Add additional thread to sporadic example

Two threads now spawn instead of one.