Mercurial > hg > Game > Cerium
changeset 1058:d3cb29f1eccb draft
create task_name_list array in Scheduler.h
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 16 Dec 2010 00:00:49 +0900 |
parents | 8cd123d2f3ca |
children | a8d96bafe9a3 |
files | TaskManager/kernel/schedule/Scheduler.cc TaskManager/kernel/schedule/Scheduler.h |
diffstat | 2 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/schedule/Scheduler.cc Tue Dec 14 23:17:04 2010 +0900 +++ b/TaskManager/kernel/schedule/Scheduler.cc Thu Dec 16 00:00:49 2010 +0900 @@ -296,17 +296,19 @@ } extern void -register_task(int cmd, TaskObjectRun run) +register_task(int cmd, TaskObjectRun run, const char *str) { task_list[cmd].run = run; task_list[cmd].load = null_loader; task_list[cmd].wait = null_waiter; + task_name_list[cmd] = str; } extern void register_dynamic_task(int cmd, memaddr start, int size, - TaskObjectRun run, int entry_offset) + TaskObjectRun run, int entry_offset, + const char *str) { task_list[cmd].run = run; task_list[cmd].location = start; @@ -315,6 +317,7 @@ task_list[cmd].entry_offset = entry_offset; task_list[cmd].load = load_task; task_list[cmd].wait = wait_load; + task_name_list[cmd] = str; #if 0 this->printf("cmd = %d\n",cmd); this->printf("locatation = 0x%x\n",start);
--- a/TaskManager/kernel/schedule/Scheduler.h Tue Dec 14 23:17:04 2010 +0900 +++ b/TaskManager/kernel/schedule/Scheduler.h Thu Dec 16 00:00:49 2010 +0900 @@ -145,10 +145,11 @@ } ; -extern void register_task(int cmd, TaskObjectRun run); +extern void register_task(int cmd, TaskObjectRun run, const char *str); extern void register_dynamic_task(int cmd, memaddr start, int size, TaskObjectRun run, - int entry_offset); + int entry_offset, + const char *str); struct tbl { unsigned int vma; @@ -158,6 +159,7 @@ }; extern TaskObject task_list[MAX_TASK_OBJECT]; +extern const char *task_name_list[MAX_TASK_OBJECT]; inline void loadSchedTask(Scheduler *scheduler,int command) @@ -190,10 +192,10 @@ } #define SchedRegisterTask(cmd, str) \ - register_task(cmd, runTask_##str); + register_task(cmd, runTask_##str, #str); #define SchedRegister(str) \ - register_task(str, runTask_##str); + register_task(str, runTask_##str, #str); #define SchedDefineDynamicTask(str,segment) \ SchedDefineTask(str) @@ -215,7 +217,8 @@ register_dynamic_task(cmd, (memaddr)(_EAR_+_ovly_table[segment].file_offset), \ _ovly_table[segment].size, \ runTask_##str, \ - runTask_##str##_offset); + runTask_##str##_offset, \ + #str); #define SchedRegisterDynamic(str, segment) SchedRegisterDynamicTask(str, str, segment) #else #define SchedRegisterDynamicTask(cmd, str, segment) SchedRegisterTask(cmd, str)