From 90dd5e407776404bdf1896e4d61cc11361ff1919 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 22 Apr 2024 02:11:35 +0200 Subject: [PATCH] use k --- src/sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sched.c b/src/sched.c index 1138ae3..b36c159 100644 --- a/src/sched.c +++ b/src/sched.c @@ -262,7 +262,7 @@ sched_worker(void *arg) // Vol car aucune tâche trouvée for(int i = 0, k = rand() % (s->nthreads + 1), target; i < s->nthreads; ++i) { - target = (i + curr_th) % s->nthreads; + target = (i + k) % s->nthreads; if(s->bottom[target] != s->top[target]) { // Tâche trouvée