suricata
util-pool-thread.c File Reference
#include "suricata-common.h"
#include "util-pool.h"
#include "util-pool-thread.h"
#include "util-unittest.h"
#include "util-debug.h"
Include dependency graph for util-pool-thread.c:

Go to the source code of this file.

Data Structures

struct  PoolThreadTestData
 

Functions

PoolThreadPoolThreadInit (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 *))
 per thread Pool, initialization function More...
 
int PoolThreadExpand (PoolThread *pt)
 expand pool by one for a new thread More...
 
int PoolThreadSize (PoolThread *pt)
 get size of PoolThread (number of 'threads', so array elements) More...
 
void PoolThreadFree (PoolThread *pt)
 destroy the thread pool More...
 
void * PoolThreadGetById (PoolThread *pt, uint16_t id)
 get data from thread pool by thread id More...
 
void PoolThreadReturn (PoolThread *pt, void *data)
 return data to thread pool More...
 
void PoolThreadLock (PoolThread *pt, PoolThreadId id)
 
void PoolThreadReturnRaw (PoolThread *pt, PoolThreadId id, void *data)
 
void PoolThreadUnlock (PoolThread *pt, PoolThreadId id)
 
void PoolThreadRegisterTests (void)
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Pool utility functions

Definition in file util-pool-thread.c.