Keep first func, don't sleep for now, we don't wake up.
authorMalte S. Stretz <mss@apache.org>
Tue, 13 Jan 2009 12:54:47 +0000 (12:54 +0000)
committerMalte S. Stretz <mss@apache.org>
Tue, 13 Jan 2009 12:54:47 +0000 (12:54 +0000)
src/sched.c

index 878e158..be92cca 100644 (file)
@@ -78,14 +78,17 @@ void sched_loop()
         sched_put(func);
       
       // Get next pointer, exit loop if done.
-      running  = sched_get(&func);
-      running &= (sched_res_t)(func == first);
+      running  = sched_get(&func);\r
+      if (func == first) {\r
+        sched_put(func);\r
+        running = 0;\r
+      }
     }
 
     // Wait for next interrupt.
     sleep_enable();
     sei();
-    sleep_cpu();
+    //sleep_cpu();
   }
 }