Skip to content

Commit f3b6dbb

Browse files
authored
Merge pull request #77 from mchalain/master
new build tools
2 parents 83d02ba + 9ab7596 commit f3b6dbb

File tree

4 files changed

+214
-26
lines changed

4 files changed

+214
-26
lines changed

configure

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function help {
2323
printf "\t--help\t\t\tdisplay this help and exit\n"
2424
printf "\nInstallation directories:\n"
2525
printf "\t--prefix=PREFIX\t\tinstall architecture-independent files in PREFIX [/usr/local]\n"
26+
printf "\t--exec-prefix=PREFIX\t\tinstall architecture-dependent files in PREFIX [/usr/local]\n"
2627
printf "\t--bindir=DIR\t\tuser executables [PREFIX/bin]\n"
2728
printf "\t--sbindir=DIR\t\tsystem admin executables [PREFIX/sbin]\n"
2829
printf "\t--sysconfdir=DIR\tread-only single-machine data [PREFIX/etc]\n"
@@ -72,6 +73,9 @@ while [ "${1}" != "" ]; do
7273
--prefix*)
7374
prefix=$(argument ${1})
7475
;;
76+
--exec-prefix*)
77+
exec_prefix=$(argument ${1})
78+
;;
7579
--program-prefix*)
7680
program_prefix=$(argument ${1})
7781
;;
@@ -164,6 +168,10 @@ if [ -n "$prefix" ]; then
164168
echo "prefix="$prefix"" >> ${builddir}$out
165169
printf " prefix:\t$prefix\n"
166170
fi
171+
if [ -n "${exec_prefix}" ]; then
172+
echo "exec-prefix="${exec_prefix}"" >> ${builddir}$out
173+
printf " exec-prefix:\t${exec_prefix}\n"
174+
fi
167175
if [ -n "$bindir" ]; then
168176
echo "bindir="$bindir"" >> ${builddir}$out
169177
printf " bindir:\t$bindir\n"

scripts.mk

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ endif
254254
# objects recipes generation
255255
##
256256
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(eval $(t)_SOURCES+=$(patsubst %.hpp,%.moc.cpp,$($(t)_QTHEADERS) $($(t)_QTHEADERS-y))))
257-
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(if $(findstring .cpp, $(notdir $($(t)_SOURCES))), $(eval $(t)_LIBRARY+=stdc++)))
257+
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(if $(findstring .cpp, $(notdir $($(t)_SOURCES))), $(eval $(t)_LIBS+=stdc++)))
258258

259259
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(eval $(t)-objs+=$(patsubst %.s,%.o,$(patsubst %.S,%.o,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$($(t)_SOURCES) $($(t)_SOURCES-y)))))))
260260
target-objs:=$(foreach t, $(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(if $($(t)-objs), $(addprefix $(obj),$($(t)-objs)), $(obj)$(t).o))
@@ -292,17 +292,22 @@ gcov-target:=$(target-objs:%.o=%.gcov)
292292

293293
$(foreach t,$(slib-y) $(lib-y),$(eval include-y+=$($(t)_HEADERS)))
294294

295+
define cmd_pkgconfig
296+
$(shell $(PKGCONFIG) --silence-errors $(2) $(1))
297+
endef
295298
# LIBRARY may contain libraries name to check
296299
# The name may terminate with {<version>} informations like LIBRARY+=usb{1.0}
297-
# Here the commands remove the informations and store the name into LIBS
300+
# The LIBRARY values use pkg-config to update CFLAGS, LDFLAGS and LIBS
298301
# After LIBS contains all libraries name to link
299-
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBRARY),$(eval $(t)_LIBS+=$(firstword $(subst {, ,$(subst },,$(l)))) ) ))
300-
$(foreach l, $(LIBRARY),$(eval LIBS+=$(firstword $(subst {, ,$(subst },,$(l)))) ) )
301302

302-
$(foreach l, $(LIBS),$(eval CFLAGS+=$(shell $(PKGCONFIG) --cflags lib$(l) 2> /dev/null) ) )
303-
$(foreach l, $(LIBS),$(eval LDFLAGS+=$(shell $(PKGCONFIG) --libs-only-L lib$(l) 2> /dev/null) ) )
304-
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBS),$(eval $(t)_CFLAGS+=$(shell $(PKGCONFIG) --cflags lib$(l) 2> /dev/null))))
305-
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBS),$(eval $(t)_LDFLAGS+=$(shell $(PKGCONFIG) --libs-only-L lib$(l) 2> /dev/null) ) ))
303+
$(foreach l,$(LIBRARY),$(eval CFLAGS+=$(call cmd_pkgconfig,$(firstword $(subst {, ,$(subst },,$(l)))), --cflags) ) )
304+
$(foreach l,$(LIBRARY),$(eval LDFLAGS+=$(call cmd_pkgconfig,$(firstword $(subst {, ,$(subst },,$(l)))), --libs-only-L) ) )
305+
$(eval LIBS=$(sort $(LIBS)))
306+
$(foreach l,$(LIBRARY),$(eval LIBS+=$(subst -l,,$(call cmd_pkgconfig,$(firstword $(subst {, ,$(subst },,$(l)))), --libs-only-l)) ) )
307+
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBRARY),$(eval $(t)_CFLAGS+=$(call cmd_pkgconfig,$(firstword $(subst {, ,$(subst },,$(l)))), --cflags))))
308+
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBRARY),$(eval $(t)_LDFLAGS+=$(call cmd_pkgconfig,$(firstword $(subst {, ,$(subst },,$(l)))), --libs-only-L) ) ))
309+
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBRARY),$(eval $(t)_LIBS+=$(subst -l,,$(call cmd_pkgconfig,$(firstword $(subst {, ,$(subst },,$(l)))), --libs-only-l)) ) ))
310+
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(eval $(t)_LIBS=$(sort $($(t)_LIBS))))
306311

307312
# set the CFLAGS of each source file
308313
$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(s:%.c=%)_CFLAGS+=$($(t)_CFLAGS)) ))
@@ -320,7 +325,7 @@ $(foreach t,$(bin-y) $(sbin-y),$(if $(findstring dl, $($(t)_LIBS) $(LIBS)),$(eva
320325
# targets recipes generation
321326
##
322327

323-
lib-check-target:=$(LIBRARY) $(sort $(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$($(t)_LIBRARY)))
328+
lib-check-target:=$(sort $(LIBRARY:%=check_%) $(sort $(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$($(t)_LIBRARY:%=check_%))))
324329

325330
ifeq (STATIC,y)
326331
lib-static-target:=$(addprefix $(obj),$(addsuffix $(slib-ext:%=.%),$(addprefix $(library_prefix),$(slib-y) $(lib-y))))
@@ -505,25 +510,25 @@ RPATH=$(wildcard $(addsuffix /.,$(wildcard $(CURDIR:%/=%)/* $(obj)*)))
505510
quiet_cmd_yacc_y=YACC $*
506511
cmd_yacc_y=$(YACC) -o $@ $<
507512
quiet_cmd_as_o_s=AS $*
508-
cmd_as_o_s=$(TARGETAS) $(ASFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $<
513+
cmd_as_o_s=$(TARGETAS) $(ASFLAGS) $($*_CFLAGS) $(if $(SYSROOT),$(SYSROOT_CFLAGS)) -c -o $@ $<
509514
quiet_cmd_cc_o_c=CC $*
510515
cmd_cc_o_c=$(TARGETCC) $(CFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $<
511516
quiet_cc_gcov_c=GCOV $*
512517
cmd_cc_gcov_c=$(TARGETGCOV) -p $<
513518
quiet_cmd_cc_o_cpp=CXX $*
514-
cmd_cc_o_cpp=$(TARGETCXX) $(CXXFLAGS) $(CFLAGS) $($*_CXXFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $<
519+
cmd_cc_o_cpp=$(TARGETCXX) $(CXXFLAGS) $(CFLAGS) $($*_CXXFLAGS) $($*_CFLAGS) $(if $(SYSROOT),$(SYSROOT_CFLAGS)) -c -o $@ $<
515520
quiet_cmd_moc_hpp=QTMOC $*
516521
cmd_moc_hpp=$(MOC) $(INCLUDES) $($*_MOCFLAGS) $($*_MOCFLAGS-y) -o $@ $<
517522
quiet_cmd_uic_hpp=QTUIC $*
518523
cmd_uic_hpp=$(UIC) $< > $@
519524
quiet_cmd_ld_bin=LD $*
520-
cmd_ld_bin=$(TARGETCC) -L. $($*_LDFLAGS) $(LDFLAGS) $(SYSROOT_LDFLAGS) $(RPATHFLAGS) -o $@ $^ -Wl,--start-group $(LIBS:%=-l%) $($*_LIBS:%=-l%) -Wl,--end-group -lc
525+
cmd_ld_bin=$(TARGETCC) -L. $($*_LDFLAGS) $(LDFLAGS) $(if $(SYSROOT),$(SYSROOT_LDFLAGS)) $(RPATHFLAGS) -o $@ $^ -Wl,--start-group $(LIBS:%=-l%) $($*_LIBS:%=-l%) -Wl,--end-group -lc
521526
quiet_cmd_ld_slib=LD $*
522527
cmd_ld_slib=$(RM) $@ && \
523528
$(TARGETAR) -cvq $@ $^ > /dev/null && \
524529
$(TARGETRANLIB) $@
525530
quiet_cmd_ld_dlib=LD $*
526-
cmd_ld_dlib=$(TARGETCC) $($*_LDFLAGS) $(LDFLAGS) $(SYSROOT_LDFLAGS) $(RPATHFLAGS) -Bdynamic -shared -o $@ $^ $(addprefix -L,$(RPATH)) $(LIBS:%=-l%) $($*_LIBS:%=-l%) -lc
531+
cmd_ld_dlib=$(TARGETCC) $($*_LDFLAGS) $(LDFLAGS) $(if $(SYSROOT),$(SYSROOT_LDFLAGS)) $(RPATHFLAGS) -Bdynamic -shared -o $@ $^ $(LIBS:%=-l%) $($*_LIBS:%=-l%) -lc
527532

528533
quiet_cmd_hostcc_o_c=HOSTCC $*
529534
cmd_hostcc_o_c=$(HOSTCC) $(HOSTCFLAGS) $($*_CFLAGS) -c -o $@ $<
@@ -621,21 +626,22 @@ quiet_cmd_check_lib=CHECK $*
621626
define cmd_check_lib
622627
$(RM) $(TMPDIR)/$(TESTFILE:%=%.c) $(TMPDIR)/$(TESTFILE)
623628
echo "int main(){}" > $(TMPDIR)/$(TESTFILE:%=%.c)
624-
$(TARGETCC) -c -o $(TMPDIR)/$(TESTFILE:%=%.o) $(TMPDIR)/$(TESTFILE:%=%.c) $(INTERN_CFLAGS) $(CFLAGS) > /dev/null 2>&1
625-
$(TARGETLD) -o $(TMPDIR)/$(TESTFILE) $(TMPDIR)/$(TESTFILE:%=%.o) $(INTERN_LDFLAGS) $(LDFLAGS) $(addprefix -l, $2) > /dev/null 2>&1
629+
$(eval CHECKLIB=$(firstword $(subst {, ,$(subst },,$2))))
630+
$(eval CHECKVERSION=$(if $(findstring {, $(2)),$(subst -, - ,$(lastword $(subst {, ,$(subst },,$2))))))
631+
$(eval CHECKOPTIONS=$(if $(CHECKVERSION),$(if $(findstring -,$(firstword $(CHECKVERSION))),--atleast-version=$(word 2,$(CHECKVERSION)))))
632+
$(eval CHECKOPTIONS+=$(if $(CHECKVERSION),$(if $(findstring -,$(lastword $(CHECKVERSION))),--max-version=$(word 1,$(CHECKVERSION)))))
633+
$(eval CHECKOPTIONS+=$(if $(CHECKVERSION),$(if $(findstring -,$(CHECKVERSION)),,--exact-version=$(CHECKVERSION))))
634+
$(PKGCONFIG) --exists --print-errors $(CHECKOPTIONS) $(CHECKLIB)
635+
$(eval CHECKCFLAGS:=$(call cmd_pkgconfig,$(CHECKLIB),--cflags))
636+
$(eval CHECKLDFLAGS:=$(call cmd_pkgconfig,$(CHECKLIB),--libs))
637+
$(TARGETCC) -c -o $(TMPDIR)/$(TESTFILE:%=%.o) $(TMPDIR)/$(TESTFILE:%=%.c) $(INTERN_CFLAGS) $(CHECKCFLAGS) > /dev/null 2>&1
638+
$(TARGETLD) -o $(TMPDIR)/$(TESTFILE) $(TMPDIR)/$(TESTFILE:%=%.o) $(INTERN_LDFLAGS) $(CHECKLDFLAGS) > /dev/null 2>&1
626639
endef
627640

628-
checkoption:=--exact-version
629-
prepare_check=$(if $(filter %-, $2),$(eval checkoption:=--atleast-version),$(if $(filter -%, $2),$(eval checkoption:=--max-version)))
630-
cmd_check2_lib=$(if $(findstring $(3:%-=%), $3),$(if $(findstring $(3:-%=%), $3),,$(eval checkoption:=--atleast-version),$(eval checkoption:=--max-version))) \
631-
$(PKGCONFIG) --print-errors $(checkoption) $(subst -,,$3) lib$2
632-
633-
$(lib-check-target): %:
634-
@$(RM) $(TMPDIR)/$(TESTFILE:%=%.c) $(TMPDIR)/$(TESTFILE)
635-
@echo "int main(){}" > $(TMPDIR)/$(TESTFILE:%=%.c)
636-
@$(call cmd,check_lib,$(firstword $(subst {, ,$(subst },,$@))))
637-
@$(call prepare_check,$(lastword $(subst {, ,$(subst },,$@))))
638-
@$(if $(findstring $(words $(subst {, ,$(subst },,$@))),2),$(call cmd,check2_lib,$(firstword $(subst {, ,$(subst },,$@))),$(lastword $(subst {, ,$(subst },,$@)))))
641+
$(lib-check-target): check_%:
642+
$(Q)$(RM) $(TMPDIR)/$(TESTFILE:%=%.c) $(TMPDIR)/$(TESTFILE)
643+
$(Q)echo "int main(){}" > $(TMPDIR)/$(TESTFILE:%=%.c)
644+
$(Q)$(call cmd,check_lib,$*)
639645

640646
###############################################################################
641647
# Commands for install
@@ -777,6 +783,7 @@ quiet_cmd_generate_pkgconfig=PKGCONFIG $*
777783
define cmd_generate_pkgconfig
778784
printf '# generated by makemore\n' > $@
779785
printf 'prefix=$(prefix)\n' >> $@
786+
printf 'exec_prefix=$${prefix}\n' >> $@
780787
printf 'sysconfdir=$(sysconfdir:$(prefix)/%=$${prefix}/%)\n' >> $@
781788
printf 'libdir=$(libdir:$(prefix)/%=$${exec_prefix}/%)\n' >> $@
782789
printf 'pkglibdir=$(pkglibdir:$(prefix)/%=$${exec_prefix}/%)\n' >> $@

src/httpserver/threadpool.c

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/*****************************************************************************
2+
* threadpool.c: pthread pool
3+
* this file is part of https://github.com/ouistiti-project/libhttpserver
4+
*****************************************************************************
5+
* Copyright (C) 2021-2022
6+
*
7+
* Authors: Marc Chalain <marc.chalain@gmail.com>
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining
10+
* a copy of this software and associated documentation files (the
11+
* "Software"), to deal in the Software without restriction, including
12+
* without limitation the rights to use, copy, modify, merge, publish,
13+
* distribute, sublicense, and/or sell copies of the Software, and to
14+
* permit persons to whom the Software is furnished to do so, subject
15+
* to the following conditions:
16+
*
17+
* The above copyright notice and this permission notice shall be
18+
* included in all copies or substantial portions of the Software.
19+
*
20+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27+
*****************************************************************************/
28+
29+
#include <pthread.h>
30+
#include <stdlib.h>
31+
32+
#include "log.h"
33+
#include "threadpool.h"
34+
35+
typedef struct thread_s thread_t;
36+
struct thread_s
37+
{
38+
pthread_t id;
39+
pthread_mutex_t mutex;
40+
pthread_cond_t cond;
41+
enum
42+
{
43+
E_STOPPED = 0,
44+
E_WAITING,
45+
E_RUNNING,
46+
} state;
47+
ThreadHandler_t hdl;
48+
void *hdldata;
49+
void *userdata;
50+
Thread_t *next;
51+
};
52+
53+
typedef struct threadpool_s threadpool_t;
54+
struct threadpool_s
55+
{
56+
thread_t *threads;
57+
};
58+
59+
static void * _thread_run(void *data)
60+
{
61+
thread_t *thread = (Thread_t *)data;
62+
63+
warn("thread start");
64+
while (thread->state > E_STOPPED)
65+
{
66+
pthread_mutex_lock(&thread->mutex);
67+
while (thread->state == E_WAITING)
68+
pthread_cond_wait(&thread->cond, &thread->mutex);
69+
pthread_mutex_unlock(&thread->mutex);
70+
if (thread->state == E_STOPPED)
71+
break;
72+
thread->hdl(thread->hdldata, thread->userdata);
73+
74+
pthread_mutex_lock(&thread->mutex);
75+
thread->state = E_WAITING;
76+
pthread_mutex_unlock(&thread->mutex);
77+
}
78+
warn("thread end");
79+
}
80+
81+
threadpool_t *threadpool_init(int pooldepth)
82+
{
83+
pthread_setcanceltype(PTHREAD_CANCEL_ENABLE, NULL);
84+
threadpool_t *pool = calloc(1, sizeof(*pool));
85+
86+
for (int i = 0; i < pooldepth; i++)
87+
{
88+
thread_t *it = calloc(1, sizeof(*it));
89+
90+
it->next = pool->threads;
91+
pool->threads = it;
92+
93+
pthread_mutex_init(&it->mutex, NULL);
94+
pthread_cond_init(&it->cond, NULL);
95+
it->state = E_WAITING;
96+
pthread_create(&it->id, NULL, _thread_run, it);
97+
}
98+
return pool;
99+
}
100+
101+
int threadpool_get(threadpool_t *pool, threadhandler_t hdl, void *hdldata, void *userdata)
102+
{
103+
int ret = -1;
104+
int pressure = 0;
105+
for (thread_t *it = pool->threads; it != NULL; it = it->next)
106+
{
107+
if (it->state == E_WAITING)
108+
{
109+
pthread_mutex_lock(&it->mutex);
110+
it->hdl = hdl;
111+
it->hdldata = hdldata;
112+
it->userdata = userdata;
113+
it->state = E_RUNNING;
114+
pthread_mutex_unlock(&it->mutex);
115+
pthread_cond_signal(&it->cond);
116+
ret = (int) it->id;
117+
}
118+
else
119+
pressure++;
120+
}
121+
dbg("threadpool pressure %d", pressure);
122+
return ret;
123+
}
124+
125+
void threadpool_destroy(threadpool_t *pool)
126+
{
127+
for (thread_t *it = pool->threads; it == NULL; it = it->next)
128+
{
129+
pthread_mutex_lock(&it->mutex);
130+
it->state = E_STOPPED;
131+
pthread_mutex_unlock(&it->mutex);
132+
pthread_cond_signal(&it->cond);
133+
pthread_cancel(it->id);
134+
}
135+
}

src/httpserver/threadpool.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*****************************************************************************
2+
* threadpool.h: pthread pool
3+
* this file is part of https://github.com/ouistiti-project/libhttpserver
4+
*****************************************************************************
5+
* Copyright (C) 2021-2022
6+
*
7+
* Authors: Marc Chalain <marc.chalain@gmail.com>
8+
*
9+
* Permission is hereby granted, free of charge, to any person obtaining
10+
* a copy of this software and associated documentation files (the
11+
* "Software"), to deal in the Software without restriction, including
12+
* without limitation the rights to use, copy, modify, merge, publish,
13+
* distribute, sublicense, and/or sell copies of the Software, and to
14+
* permit persons to whom the Software is furnished to do so, subject
15+
* to the following conditions:
16+
*
17+
* The above copyright notice and this permission notice shall be
18+
* included in all copies or substantial portions of the Software.
19+
*
20+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27+
*****************************************************************************/
28+
#ifndef __THREADPOOL_H__
29+
#define __THREADPOOL_H__
30+
31+
typedef struct threadpool_s threadpool_t;
32+
typedef int(*threadhandler_t)(void *data, void *userdata);
33+
34+
threadpool_t *threadpool_init(int pooldepth);
35+
int threadpool_get(threadpool_t *pool, ThreadHandler_t hdl, void *hdldata, void *userdata);
36+
void threadpool_destroy(threadpool_t *pool);
37+
38+
#endif

0 commit comments

Comments
 (0)