use inline atomics and thread pointer on arm models supporting them