bugs resolved

This commit is contained in:
Adrien Bourmault 2021-06-23 10:55:35 +02:00
parent 2be99a944f
commit 7c4c43b996
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
1 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ static void *schedulerMain(void *scheduler)
while (!args->pleaseStop && (nPartialCycles / ncpu) <= args->nmaxCycles) { while (!args->pleaseStop && (nPartialCycles / ncpu) <= args->nmaxCycles) {
//printLog("Scheduler #%lu online: cycle %d\n", *args->id, ncycles); //printLog("Scheduler #%lu online: cycle %d\n", *args->id, ncycles);
// XXX statistics here // TODO statistics here
// Create a new thread // Create a new thread
if (nworker < ncpu) { if (nworker < ncpu) {
@ -124,10 +124,10 @@ static void *schedulerMain(void *scheduler)
workArea = NULL; workArea = NULL;
// Acquiring lock to consistently read the arrowArray // Acquiring lock to consistently read the arrowArray
if (acquireNonBlockinArrowgLock(args->arrowArray)) { //XXX does not return 0 if (acquireNonBlockinArrowgLock(args->arrowArray)) {
// Random choice of an arrow // Random choice of an arrow
electedArrow = electedArrow =
&args->arrowArray->array[rand() % args->arrowArray->size]; // XXX size is 0 &args->arrowArray->array[rand() % args->arrowArray->size];
// Find a local area // Find a local area
workArea = findWorkArea(centersList, electedArrow, args->ruleRadius, workArea = findWorkArea(centersList, electedArrow, args->ruleRadius,