u_queue: add util_queue_finish for waiting for previously added jobs
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sun, 22 Oct 2017 15:38:41 +0000 (17:38 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 9 Nov 2017 10:53:19 +0000 (11:53 +0100)
commit185061aef41401bead9e5d15aa00ffa2fcf7ef8c
treec04fd6225648d34f5ffd5c943162c47d5109b712
parentf0d3a4de75fdb865c058aba8614f0fe6ba5f0969
u_queue: add util_queue_finish for waiting for previously added jobs

Schedule one job for every thread, and wait on a barrier inside the job
execution function.

v2: avoid alloca (fixes Windows build error)

Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
src/util/u_queue.c
src/util/u_queue.h