From 322f90b20c050a10ef1c3634f668828574b6be4f Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Sat, 19 Jun 2021 16:32:39 +0200 Subject: [PATCH] Worker has now access to space --- include/base.h | 4 ++++ src/scheduler.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/include/base.h b/include/base.h index 17d70f6..9f7f810 100644 --- a/include/base.h +++ b/include/base.h @@ -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; diff --git a/src/scheduler.c b/src/scheduler.c index 8a709fe..3692fef 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -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.