Critical tests: use atomics
Critical tests: use atomics

Get rid of a volatile, and use atomics to synchronise with the interrupt
routine instead.

Useful as a non-RTOS basic compilation check for the atomics - the
fuller atomic test relies on the RTOS.

kjbracey-arm/mbed,kjbracey-arm/mbed,kjbracey-arm/mbed,andcor02/mbed-os,kjbracey-arm/mbed,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed