diff --git a/HISTORY b/HISTORY index e68c91b..e8bd699 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,7 @@ -Version 1.42 2019-11-30 +Version 1.42 2019-12-03 * add function get_gzip_command_filename + * function create_work_threads changed Version 1.41 2019-09-30 * change CIDR network_bits range from [16, 32) to [10, 32) diff --git a/src/pthread_func.c b/src/pthread_func.c index 9182b93..a66bd10 100644 --- a/src/pthread_func.c +++ b/src/pthread_func.c @@ -136,11 +136,12 @@ int init_pthread_attr(pthread_attr_t *pattr, const int stack_size) return 0; } -int create_work_threads(int *count, void *(*start_func)(void *), \ - void *arg, pthread_t *tids, const int stack_size) +int create_work_threads(int *count, void *(*start_func)(void *), + void **args, pthread_t *tids, const int stack_size) { int result; pthread_attr_t thread_attr; + void **current_arg; pthread_t *ptid; pthread_t *ptid_end; @@ -151,16 +152,16 @@ int create_work_threads(int *count, void *(*start_func)(void *), \ result = 0; ptid_end = tids + (*count); - for (ptid=tids; ptid