Mercurial > hg > Game > Cerium
comparison TaskManager/Cell/CellTaskManagerImpl.cc @ 713:97adb3fe85c6 draft
remove SIMPLE_TASK conditional
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 16 Dec 2009 15:27:46 +0900 |
parents | ec6c897448ca |
children | e78238b7c5d6 |
comparison
equal
deleted
inserted
replaced
712:8476791e2905 | 713:97adb3fe85c6 |
---|---|
89 */ | 89 */ |
90 void | 90 void |
91 CellTaskManagerImpl::set_runTaskList() | 91 CellTaskManagerImpl::set_runTaskList() |
92 { | 92 { |
93 TaskListPtr list; | 93 TaskListPtr list; |
94 #ifdef SIMPLE_TASK | |
95 SimpleTaskPtr task; | 94 SimpleTaskPtr task; |
96 #else | |
97 TaskPtr task; | |
98 #endif | |
99 int speid; | 95 int speid; |
100 | 96 |
101 while (HTaskPtr htask = activeTaskQueue->poll()) { | 97 while (HTaskPtr htask = activeTaskQueue->poll()) { |
102 | 98 |
103 if (htask->cpu_type == SPE_ANY) { | 99 if (htask->cpu_type == SPE_ANY) { |
128 speTaskList_bg[speid] = newList; | 124 speTaskList_bg[speid] = newList; |
129 list = newList; | 125 list = newList; |
130 } | 126 } |
131 | 127 |
132 task = &list->tasks[list->length++]; | 128 task = &list->tasks[list->length++]; |
133 #ifdef SIMPLE_TASK | 129 |
134 if (htask->command==TaskArray1) { | 130 if (htask->command==TaskArray1) { |
135 // compatibility | 131 // compatibility |
136 // Task with ListData is stored in the ListData | 132 // Task with ListData is stored in the ListData |
137 int next = (htask->r_size+sizeof(SimpleTask))/sizeof(SimpleTask); | 133 int next = (htask->r_size+sizeof(SimpleTask))/sizeof(SimpleTask); |
138 if (list->length+next>=TASK_MAX_SIZE) { | 134 if (list->length+next>=TASK_MAX_SIZE) { |
150 htask->rbuf = 0; htask->r_size = 0; | 146 htask->rbuf = 0; htask->r_size = 0; |
151 *task = *(SimpleTask*)htask; | 147 *task = *(SimpleTask*)htask; |
152 } else { | 148 } else { |
153 *task = *(SimpleTask*)htask; | 149 *task = *(SimpleTask*)htask; |
154 } | 150 } |
155 #else | |
156 TaskPtr stask = (TaskPtr) task; | |
157 *stask = *(TaskPtr) htask; | |
158 #endif | |
159 | 151 |
160 } | 152 } |
161 } | 153 } |
162 | 154 |
163 void | 155 void |