Sleep on block requests using kthreads
[akaros.git] / kern / src / manager.c
index 160129d..efcca2e 100644 (file)
@@ -115,7 +115,13 @@ void manager_brho(void)
 
        /* I usually want this */
        schedule();
-       printk("No work to do (schedule returned)\n");
+       process_routine_kmsg(); /* maybe do this before schedule() */
+
+       enable_irq();
+       /* this ghetto hack really wants to wait for an interrupt, but time out */
+       udelay(60000);  /* wait for IO when there really is nothing to do */
+       process_routine_kmsg();
+       printd("No work to do (schedule returned)\n");
        monitor(0);
 
        // for testing taking cores, check in case 1 for usage