From 504cdc0b22406bd3c28b16c69deaaba7be104923 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 21 Mar 2021 17:40:07 +0100 Subject: Rename thread pool serial implementation data structure Hopeing that coverity can now tell the two appart. Signed-off-by: David Oberhollenzer --- lib/util/threadpool_serial.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/util/threadpool_serial.c b/lib/util/threadpool_serial.c index 86eade8..834cfa7 100644 --- a/lib/util/threadpool_serial.c +++ b/lib/util/threadpool_serial.c @@ -26,11 +26,11 @@ typedef struct { thread_pool_worker_t fun; void *user; int status; -} thread_pool_impl_t; +} serial_impl_t; static void destroy(thread_pool_t *interface) { - thread_pool_impl_t *pool = (thread_pool_impl_t *)interface; + serial_impl_t *pool = (serial_impl_t *)interface; while (pool->queue != NULL) { work_item_t *item = pool->queue; @@ -55,7 +55,7 @@ static size_t get_worker_count(thread_pool_t *pool) static void set_worker_ptr(thread_pool_t *interface, size_t idx, void *ptr) { - thread_pool_impl_t *pool = (thread_pool_impl_t *)interface; + serial_impl_t *pool = (serial_impl_t *)interface; if (idx >= 1) return; @@ -65,7 +65,7 @@ static void set_worker_ptr(thread_pool_t *interface, size_t idx, void *ptr) static int submit(thread_pool_t *interface, void *ptr) { - thread_pool_impl_t *pool = (thread_pool_impl_t *)interface; + serial_impl_t *pool = (serial_impl_t *)interface; work_item_t *item = NULL; if (pool->status != 0) @@ -97,7 +97,7 @@ static int submit(thread_pool_t *interface, void *ptr) static void *dequeue(thread_pool_t *interface) { - thread_pool_impl_t *pool = (thread_pool_impl_t *)interface; + serial_impl_t *pool = (serial_impl_t *)interface; work_item_t *item; void *ptr; int ret; @@ -127,14 +127,14 @@ static void *dequeue(thread_pool_t *interface) static int get_status(thread_pool_t *interface) { - thread_pool_impl_t *pool = (thread_pool_impl_t *)interface; + serial_impl_t *pool = (serial_impl_t *)interface; return pool->status; } thread_pool_t *thread_pool_create_serial(thread_pool_worker_t worker) { - thread_pool_impl_t *pool = calloc(1, sizeof(*pool)); + serial_impl_t *pool = calloc(1, sizeof(*pool)); thread_pool_t *interface = (thread_pool_t *)pool; if (pool == NULL) -- cgit v1.2.3