view paper/src/ParGoto2.cbc @ 155:6f940582768f

...
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 16 Feb 2021 15:21:11 +0900
parents 84359208ad70
children
line wrap: on
line source

Phils* phils0 = createPhilsImpl(context,0,fork0,fork1);
Phils* phils1 = createPhilsImpl(context,1,fork1,fork2);
Phils* phils2 = createPhilsImpl(context,2,fork2,fork3);
Phils* phils3 = createPhilsImpl(context,3,fork3,fork4);
Phils* phils4 = createPhilsImpl(context,4,fork4,fork0);

struct Element* element;
                context->task = NEW(struct Context);
                initContext(context->task);
                context->task->next = phils0->thinking;
                context->task->idgCount = 0;
                context->task->idg = context->task->dataNum;
                context->task->maxIdg = context->task->idg + 0;
                context->task->odg = context->task->maxIdg;
                context->task->maxOdg = context->task->odg + 0;
GET_META(phils0)->wait = createSynchronizedQueue(context);
                element = &ALLOCATE(context, Element)->Element;
                element->data = (union Data*)context->task;
                element->next = context->taskList;
                context->taskList = element;
                context->task = NEW(struct Context);
                initContext(context->task);
                context->task->next = phils1->thinking;

...