suricata
thread-storage.h File Reference
#include "threadvars.h"
Include dependency graph for thread-storage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ThreadStorageId
 

Typedefs

typedef struct ThreadStorageId ThreadStorageId
 

Functions

unsigned int ThreadStorageSize (void)
 
void * ThreadGetStorageById (const ThreadVars *tv, ThreadStorageId id)
 
int ThreadSetStorageById (ThreadVars *tv, ThreadStorageId id, void *ptr)
 
void * ThreadAllocStorageById (ThreadVars *tv, ThreadStorageId id)
 
void ThreadFreeStorageById (ThreadVars *tv, ThreadStorageId id)
 
void ThreadFreeStorage (ThreadVars *tv)
 
void RegisterThreadStorageTests (void)
 
ThreadStorageId ThreadStorageRegister (const char *name, const unsigned int size, void *(*Alloc)(unsigned int), void(*Free)(void *))
 

Typedef Documentation

◆ ThreadStorageId

Thread wrapper around storage API.

Function Documentation

◆ RegisterThreadStorageTests()

void RegisterThreadStorageTests ( void  )

Definition at line 205 of file thread-storage.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ ThreadAllocStorageById()

void* ThreadAllocStorageById ( ThreadVars tv,
ThreadStorageId  id 
)

Definition at line 40 of file thread-storage.c.

References ThreadVars_::storage, storage_type, StorageAllocByIdPrealloc(), and tv.

Here is the call graph for this function:

◆ ThreadFreeStorage()

void ThreadFreeStorage ( ThreadVars tv)

Definition at line 50 of file thread-storage.c.

References ThreadVars_::storage, storage_type, StorageFreeAll(), ThreadStorageSize(), and tv.

Here is the call graph for this function:

◆ ThreadFreeStorageById()

void ThreadFreeStorageById ( ThreadVars tv,
ThreadStorageId  id 
)

Definition at line 45 of file thread-storage.c.

References ThreadVars_::storage, storage_type, StorageFreeById(), and tv.

Here is the call graph for this function:

◆ ThreadGetStorageById()

void* ThreadGetStorageById ( const ThreadVars tv,
ThreadStorageId  id 
)

Definition at line 30 of file thread-storage.c.

References ThreadVars_::storage, storage_type, StorageGetById(), and tv.

Here is the call graph for this function:

◆ ThreadSetStorageById()

int ThreadSetStorageById ( ThreadVars tv,
ThreadStorageId  id,
void *  ptr 
)

Definition at line 35 of file thread-storage.c.

References ThreadVars_::storage, storage_type, StorageSetById(), and tv.

Here is the call graph for this function:

◆ ThreadStorageRegister()

ThreadStorageId ThreadStorageRegister ( const char *  name,
const unsigned int  size,
void *(*)(unsigned int)  Alloc,
void(*)(void *)  Free 
)

Definition at line 56 of file thread-storage.c.

References ThreadStorageId::id, storage_type, and StorageRegister().

Here is the call graph for this function:

◆ ThreadStorageSize()

unsigned int ThreadStorageSize ( void  )

Definition at line 25 of file thread-storage.c.

References storage_type, and StorageGetSize().

Referenced by ThreadFreeStorage(), and TmThreadCreate().

Here is the call graph for this function:
Here is the caller graph for this function: