Skip to content
Snippets Groups Projects
Commit 7f268cf1 authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by Marek Olšák
Browse files

gallium/u_queue: set num_threads correctly if not all threads start


If i-th thread could not be created it means we have i threads,
not i+1, because we start from 0.

Fixes: 404d0d50 "gallium/u_queue: add an option to have multiple worker threads"
Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: default avatarMarek Olšák <marek.olsak@amd.com>
parent 99361219
No related branches found
No related tags found
No related merge requests found
...@@ -236,7 +236,7 @@ util_queue_init(struct util_queue *queue, ...@@ -236,7 +236,7 @@ util_queue_init(struct util_queue *queue,
goto fail; goto fail;
} else { } else {
/* at least one thread created, so use it */ /* at least one thread created, so use it */
queue->num_threads = i+1; queue->num_threads = i;
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment