core/thread: use disableIRQ/restoreIRQ
Merge pull request #2108 from LudwigOrtmann/thread_new_irq_api

Thread new IRQ api