I think you need to enable interrupts before calling `sched_switch()`.