Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/ppe/HTask.cc @ 1466:cb57420a8219 draft
TaskList on going...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 15 Jul 2012 13:36:55 +0900 |
parents | 3f2230d79eba |
children | d585a7614cd5 |
comparison
equal
deleted
inserted
replaced
1465:fc5b23108608 | 1466:cb57420a8219 |
---|---|
20 HTask::spawn(void) | 20 HTask::spawn(void) |
21 { | 21 { |
22 tasklog->create_time = rdtsc(); | 22 tasklog->create_time = rdtsc(); |
23 TaskList *tl = (TaskList*)rbuf; | 23 TaskList *tl = (TaskList*)rbuf; |
24 tl->self = this; | 24 tl->self = this; |
25 tl->set_last(last); | |
25 mimpl->spawn_task(this); | 26 mimpl->spawn_task(this); |
26 } | 27 } |
27 | 28 |
28 /*! | 29 /*! |
29 @brief この Task が待ち合わせする Task を指定する | 30 @brief この Task が待ち合わせする Task を指定する |
124 tl->tasks->init(id, param_count, inData_count, outData_count); | 125 tl->tasks->init(id, param_count, inData_count, outData_count); |
125 return tl->tasks; | 126 return tl->tasks; |
126 } | 127 } |
127 Task *next = t->next(); | 128 Task *next = t->next(); |
128 if (next >= tl->last()) { | 129 if (next >= tl->last()) { |
129 tl->lastTask = t; | 130 tl->set_last(t); |
130 TaskListPtr nextTaskList = mimpl->createTaskList(); | 131 TaskListPtr nextTaskList = mimpl->createTaskList(); |
131 nextTaskList->prev = tl; | 132 nextTaskList->prev = tl; |
132 tl->next = nextTaskList; | 133 tl->next = nextTaskList; |
133 tl = nextTaskList; | 134 tl = nextTaskList; |
134 next = tl->tasks; | 135 next = tl->tasks; |
135 tl->self = 0; | 136 tl->self = 0; |
136 rbuf = (memaddr)tl; | 137 rbuf = (memaddr)tl; |
137 } | 138 } |
138 next->init(id, param_count, inData_count, outData_count); | 139 next->init(id, param_count, inData_count, outData_count); |
140 last = next->next(); | |
139 return next; | 141 return next; |
140 } | 142 } |
141 | 143 |
142 | 144 |
143 /*! | 145 /*! |
146 @param last 今のTaskのポインタ (最後である必要がある) | 148 @param last 今のTaskのポインタ (最後である必要がある) |
147 */ | 149 */ |
148 void | 150 void |
149 HTask::spawn_task_array(Task * last) | 151 HTask::spawn_task_array(Task * last) |
150 { | 152 { |
151 TaskList *tl = (TaskList*)rbuf; | |
152 tl->lastTask = last; | |
153 } | 153 } |
154 | 154 |
155 | 155 |
156 /* end */ | 156 /* end */ |