core/msg: use disableIRQ and restoreIRQ