aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-21 17:40:07 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-21 17:40:07 +0100
commit504cdc0b22406bd3c28b16c69deaaba7be104923 (patch)
treee0c4a65908b70f47967bbe716741d015e5aadb56 /lib
parentbb0ef9e0eec5c27610fe381b905ef46b3f5f09c6 (diff)
Rename thread pool serial implementation data structure
Hopeing that coverity can now tell the two appart. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/util/threadpool_serial.c14
1 files 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)