X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=workqueue.c;h=27570b2a0b20e5e7cd4ad0a9ccaacf697f6962c7;hp=7cd83bfd6216bdf9cc69c70d59d9760fc31a7b9b;hb=0f9ed6bd1b396608f8bad7568a9fae85534adc2b;hpb=a6a3469ea8753a999b9bb9bea33299700d3094eb diff --git a/workqueue.c b/workqueue.c index 7cd83bfd..27570b2a 100644 --- a/workqueue.c +++ b/workqueue.c @@ -388,7 +388,9 @@ void workqueue_exit(struct workqueue *wq) sw = &wq->workers[i]; if (sw->flags & SW_F_ACCOUNTED) continue; + pthread_mutex_lock(&sw->lock); sw->flags |= SW_F_ACCOUNTED; + pthread_mutex_unlock(&sw->lock); shutdown_worker(sw, &sum_cnt); shutdown++; }