In this style of coding you end up with
main() { configure_interrupts(); while(1) { do_irq_bottom_halves(); sleep(); // "wfi" in ARM } }
In this style of coding you end up with