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

Go to the source code of this file.

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)
 
ThreadStorageId ThreadStorageRegister (const char *name, const unsigned int size, void *(*Alloc)(unsigned int), void(*Free)(void *))
 
void RegisterThreadStorageTests (void)
 

Variables

const StorageEnum storage_type = STORAGE_THREAD
 

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:

Variable Documentation

◆ storage_type