Forgot cond_init
This commit is contained in:
parent
49f19b46f2
commit
71adb90e04
6
thpool.c
6
thpool.c
|
@ -26,16 +26,11 @@
|
|||
#define THPOOL_DEBUG 0
|
||||
#endif
|
||||
|
||||
#define MAX_NANOSEC 999999999
|
||||
#define CEIL(X) ((X-(int)(X)) > 0 ? (int)(X+1) : (int)(X))
|
||||
|
||||
static volatile int threads_keepalive;
|
||||
static volatile int threads_on_hold;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ========================== STRUCTURES ============================ */
|
||||
|
||||
|
||||
|
@ -152,6 +147,7 @@ struct thpool_* thpool_init(int num_threads){
|
|||
}
|
||||
|
||||
pthread_mutex_init(&(thpool_p->thcount_lock), NULL);
|
||||
pthread_cond_init(&thpool_p->threads_all_idle, NULL);
|
||||
|
||||
/* Thread init */
|
||||
int n;
|
||||
|
|
Loading…
Reference in New Issue