From 188aba280f7c5b80b868cb1527fce9d45702a196 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 26 Oct 2016 14:59:43 +0200 Subject: ipcpd: Add threadpool for main loop This adds a threadpool for the main loop of the IPCPs. Before there was a single thread handling each request, which could result in starvation since performing name queries at the same time as enrolling a normal IPCP was impossible. --- src/ipcpd/ipcp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ipcpd/ipcp.h') diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h index 18a5bdab..c89fe438 100644 --- a/src/ipcpd/ipcp.h +++ b/src/ipcpd/ipcp.h @@ -50,7 +50,9 @@ struct ipcp { pthread_mutex_t state_mtx; pthread_cond_t state_cond; - pthread_t mainloop; + int sockfd; + char * sock_path; + pthread_t * threadpool; } ipcpi; int ipcp_init(enum ipcp_type type, -- cgit v1.2.3