diff TaskManager/kernel/schedule/Scheduler.h @ 430:fb62b7acc92b

code loading (on going...)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 24 Sep 2009 20:21:29 +0900
parents 58fee2fce1bd
children fd44dbd049aa
line wrap: on
line diff
--- a/TaskManager/kernel/schedule/Scheduler.h	Thu Sep 24 17:45:35 2009 +0900
+++ b/TaskManager/kernel/schedule/Scheduler.h	Thu Sep 24 20:21:29 2009 +0900
@@ -171,7 +171,7 @@
 };
 
 extern void register_task(int cmd, TaskObjectCreator creator);
-extern void register_dynamic_task(int cmd, TaskObjectCreator creator,
+extern void register_dynamic_task(int cmd, 
     memaddr start, memaddr end, int entry_offset);
 
 #endif
@@ -200,14 +200,16 @@
     }
 
 #define SchedExternDynamicTask(str,segment)                             \
-    extern memaddr __load_start_##segment,                             \
-           memaddr __loat_stop_##segment,                              \
-           spe_load_entry;                                             \
+    extern char __load_start_##segment[],                             \
+           __load_stop_##segment[];                              \
+    extern void spe_load_entry();                                          \
     extern SchedTask* createTask_##str(Scheduler *manager);
 
 
 #define SchedRegisterDynamicTask(cmd, str, segment)                    \
-    register_dynamic_task(cmd,  __load_start_##segment, __load_stop_##segment, createTask__##str-spe_load_entry);
+    register_dynamic_task(cmd,  (memaddr)__load_start_##segment, \
+                   (memaddr)__load_stop_##segment,\
+                   ((char *)createTask_##str)-(char *)spe_load_entry);
 
 
 /* end */