39#ifndef SURICATA_UTIL_POOL_THREAD_H
40#define SURICATA_UTIL_POOL_THREAD_H
68PoolThread *
PoolThreadInit(
int threads, uint32_t size, uint32_t prealloc_size, uint32_t elt_size,
void *(*Alloc)(
void),
int (*Init)(
void *,
void *),
void *InitData,
void (*Cleanup)(
void *),
void (*Free)(
void *));
void PoolThreadUnlock(PoolThread *pt, PoolThreadId id)
void PoolThreadFree(PoolThread *pt)
destroy the thread pool
int PoolThreadExpand(PoolThread *pt)
grow a thread pool by one
void PoolThreadRegisterTests(void)
void * PoolThreadGetById(PoolThread *pt, uint16_t id)
get data from thread pool by thread id
void PoolThreadReturn(PoolThread *pt, void *data)
return data to thread pool
int PoolThreadSize(PoolThread *pt)
get size of PoolThread (number of 'threads', so array elements)
void PoolThreadReturnRaw(PoolThread *pt, PoolThreadId id, void *data)
void PoolThreadLock(PoolThread *pt, PoolThreadId id)
PoolThread * PoolThreadInit(int threads, uint32_t size, uint32_t prealloc_size, uint32_t elt_size, void *(*Alloc)(void), int(*Init)(void *, void *), void *InitData, void(*Cleanup)(void *), void(*Free)(void *))
initialize a thread pool
PoolThreadElement * array
struct PoolThread_ PoolThread