aboutsummaryrefslogtreecommitdiff
path: root/thread-pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread-pool.c')
-rw-r--r--thread-pool.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/thread-pool.c b/thread-pool.c
index 0ebd4c2964..5025567817 100644
--- a/thread-pool.c
+++ b/thread-pool.c
@@ -197,12 +197,6 @@ restart:
}
}
-static int thread_pool_active(EventNotifier *notifier)
-{
- ThreadPool *pool = container_of(notifier, ThreadPool, notifier);
- return !QLIST_EMPTY(&pool->head);
-}
-
static void thread_pool_cancel(BlockDriverAIOCB *acb)
{
ThreadPoolElement *elem = (ThreadPoolElement *)acb;
@@ -309,8 +303,7 @@ static void thread_pool_init_one(ThreadPool *pool, AioContext *ctx)
QLIST_INIT(&pool->head);
QTAILQ_INIT(&pool->request_list);
- aio_set_event_notifier(ctx, &pool->notifier, event_notifier_ready,
- thread_pool_active);
+ aio_set_event_notifier(ctx, &pool->notifier, event_notifier_ready);
}
ThreadPool *thread_pool_new(AioContext *ctx)
@@ -344,7 +337,7 @@ void thread_pool_free(ThreadPool *pool)
qemu_mutex_unlock(&pool->lock);
- aio_set_event_notifier(pool->ctx, &pool->notifier, NULL, NULL);
+ aio_set_event_notifier(pool->ctx, &pool->notifier, NULL);
qemu_sem_destroy(&pool->sem);
qemu_cond_destroy(&pool->check_cancel);
qemu_cond_destroy(&pool->worker_stopped);