processing changes fixed again.

This commit is contained in:
Enno Rehling 2007-02-04 15:13:45 +00:00
parent 26f31ca7d5
commit 76fb1a1242
1 changed files with 23 additions and 26 deletions

View File

@ -3789,7 +3789,7 @@ process(void)
while (proc) { while (proc) {
int prio = proc->priority; int prio = proc->priority;
region *r; region *r;
processor *pglobal = proc; processor *pnext = proc;
printf("- Step %u\n", prio); printf("- Step %u\n", prio);
while (proc && proc->priority==prio) { while (proc && proc->priority==prio) {
@ -3797,51 +3797,48 @@ process(void)
proc = proc->next; proc = proc->next;
} }
while (pglobal && pglobal->priority==prio && pglobal->type==PR_GLOBAL) { while (pnext && pnext->priority==prio && pnext->type==PR_GLOBAL) {
pglobal->data.global.process(); pnext->data.global.process();
pglobal = pglobal->next; pnext = pnext->next;
} }
if (pglobal==NULL || pglobal->priority!=prio) continue; if (pnext==NULL || pnext->priority!=prio) continue;
for (r = regions; r; r = r->next) { for (r = regions; r; r = r->next) {
unit *u; unit *u;
processor *pregion = pglobal;
while (pregion && pregion->priority==prio && pregion->type==PR_REGION_PRE) { while (pnext && pnext->priority==prio && pnext->type==PR_REGION_PRE) {
pregion->data.per_region.process(r); pnext->data.per_region.process(r);
pregion = pregion->next; pnext = pnext->next;
} }
if (pregion==NULL || pregion->priority!=prio) continue; if (pnext==NULL || pnext->priority!=prio) continue;
for (u=r->units;u;u=u->next) { for (u=r->units;u;u=u->next) {
processor *porder, *punit = pregion;
while (punit && punit->priority==prio && punit->type==PR_UNIT) { while (pnext && pnext->priority==prio && pnext->type==PR_UNIT) {
punit->data.per_unit.process(u); pnext->data.per_unit.process(u);
punit = punit->next; pnext = pnext->next;
} }
if (punit==NULL || punit->priority!=prio) continue; if (pnext==NULL || pnext->priority!=prio) continue;
porder = punit; while (pnext && pnext->priority==prio && pnext->type==PR_ORDER) {
while (porder && porder->priority==prio && porder->type==PR_ORDER) {
order ** ordp = &u->orders; order ** ordp = &u->orders;
if (porder->data.per_order.thisorder) ordp = &u->thisorder; if (pnext->data.per_order.thisorder) ordp = &u->thisorder;
while (*ordp) { while (*ordp) {
order * ord = *ordp; order * ord = *ordp;
if (get_keyword(ord) == porder->data.per_order.kword) { if (get_keyword(ord) == pnext->data.per_order.kword) {
porder->data.per_order.process(u, ord); pnext->data.per_order.process(u, ord);
} }
if (*ordp==ord) ordp=&ord->next; if (*ordp==ord) ordp=&ord->next;
} }
porder = porder->next; pnext = pnext->next;
} }
} }
while (pregion && pregion->priority==prio && pregion->type==PR_REGION_POST) { if (pnext==NULL || pnext->priority!=prio) continue;
pregion->data.per_region.process(r);
pregion = pregion->next;
}
if (pregion==NULL || pregion->priority!=prio) continue;
while (pnext && pnext->priority==prio && pnext->type==PR_REGION_POST) {
pnext->data.per_region.process(r);
pnext = pnext->next;
}
} }
} }
} }