Worker has now access to space

This commit is contained in:
Adrien Bourmault 2021-06-19 16:32:39 +02:00
parent 093c3cc0ea
commit 322f90b20c
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
2 changed files with 10 additions and 0 deletions

View File

@ -44,6 +44,7 @@ struct {
struct {
size_t size;
bool lock;
Arrow_t *array;
} typedef ArrowArray_t;
@ -105,6 +106,9 @@ struct Center_t {
struct {
pthread_t *id;
Center_t *localWorkAreaCenter;
Space_t *globalDrawingSpace;
IntArray_t *transitionsTree;
ArrowArray_t *arrowList;
bool pleaseStop;
bool terminated;
int returnValue;

View File

@ -138,6 +138,12 @@ static void *schedulerMain(void *scheduler)
//printLog("Adding worker at rank %d\n", i);
// prepare the worker for the area,
workerArray[i].localWorkAreaCenter = workArea;
workerArray[i].globalDrawingSpace =
args->globalDrawingSpace;
workerArray[i].transitionsTree =
args->transitionsTree;
workerArray[i].arrowList =
args->arrowList;
// create the worker,
WorkerInit(&workerArray[i]);
// and increment worker count.