From 809abada865727ea986d69afcf2a9a3b00df560a Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Tue, 25 Jul 2017 19:54:39 +0200 Subject: lib: Add threadpool manager This adds a threadpool manager component in the library that is used in the IRMd and IPCPs. The threadpool manager now doesn't detach threads but does a join when they exit. This solves a data race in the previous implementation where some threads were not completely finished upon release of some resources. --- src/ipcpd/ipcp.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/ipcpd/ipcp.h') diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h index 3f5e1bd6..fb69df5c 100644 --- a/src/ipcpd/ipcp.h +++ b/src/ipcpd/ipcp.h @@ -93,15 +93,6 @@ struct ipcp { pthread_cond_t alloc_cond; pthread_mutex_t alloc_lock; - pthread_t * threadpool; - - struct bmp * thread_ids; - size_t max_threads; - size_t threads; - pthread_cond_t threads_cond; - pthread_mutex_t threads_lock; - - pthread_t tpm; } ipcpi; int ipcp_init(int argc, -- cgit v1.2.3