3 if bld
.env
.WITH_PTHREADPOOL
:
6 # Link to librt if needed for clock_gettime()
7 if bld
.CONFIG_SET('HAVE_LIBRT'): extra_libs
+= ' rt'
9 bld
.SAMBA_SUBSYSTEM('PTHREADPOOL',
10 source
='''pthreadpool.c
14 deps
='pthread replace tevent-util' + extra_libs
)
16 bld
.SAMBA_SUBSYSTEM('PTHREADPOOL',
17 source
='''pthreadpool_sync.c
21 deps
='replace tevent-util')
24 bld
.SAMBA_BINARY('pthreadpooltest',
27 enabled
=bld
.env
.WITH_PTHREADPOOL
,
30 bld
.SAMBA_BINARY('pthreadpooltest_cmocka',
31 source
='tests_cmocka.c',
32 deps
='PTHREADPOOL cmocka',
33 ldflags
='-Wl,--wrap=pthread_create',
34 enabled
=bld
.env
.WITH_PTHREADPOOL
and bld
.env
['HAVE_LDWRAP'],