Andrew's port to sparc
[akaros.git] / kern / src / manager.c
index f065d5d..df7b077 100644 (file)
@@ -8,8 +8,7 @@
 #endif
 
 #include <arch/types.h>
-#include <arch/apic.h>
-#include <arch/smp.h>
+#include <smp.h>
 
 #include <assert.h>
 #include <manager.h>
 void manager(void)
 {
        static uint8_t progress = 0;
-       
+       env_t *envs[256];
+
        switch (progress++) {
                case 0:
+                       envs[0] = ENV_CREATE(roslib_proctests);
+                       envs[1] = ENV_CREATE(roslib_proctests);
+                       envs[2] = ENV_CREATE(roslib_proctests);
+                       envs[3] = ENV_CREATE(roslib_fptest);
+                       envs[4] = ENV_CREATE(roslib_fptest);
+                       envs[4] = ENV_CREATE(roslib_fptest);
+                       envs[5] = ENV_CREATE(roslib_hello);
+                       envs[6] = ENV_CREATE(roslib_null);
+                       //envs[6] = ENV_CREATE(roslib_measurements);
+                       env_run(envs[0]);
+                       break;
+               case 1:
+               case 2:
+               case 3:
+               #if 0
+               case 0:
                        printk("Beginning Tests\n");
-                       test_run_measurements(progress);  // should never return
+                       test_run_measurements(progress-1);  // should never return
                        break;
                case 1:
                case 2:
@@ -46,10 +62,12 @@ void manager(void)
                case 12:
                case 13:
                case 14:
-                       test_run_measurements(progress);
+                       test_run_measurements(progress-1);
                        break;
+               #endif
                default:
-                       panic("Don't Panic");
+                       printk("Manager Progress: %d\n", progress);
+                       schedule();
        }
        panic("If you see me, then you probably screwed up");