This commit is contained in:
Mylloon 2024-04-22 02:11:35 +02:00
parent 222e9cb303
commit 90dd5e4077
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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