it isn't safe to do cross-thread communication with multiple variables
unless we use memory barriers between them, both on writes and reads.
In the case of musashi, it's the sequence of set irq/do_reset and reset cycles left.
This patch introduces memory barriers between the writes and reads of these