suricata
|
#include "threadvars.h"
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 struct ThreadStorageId ThreadStorageId |
Thread wrapper around storage API.
void RegisterThreadStorageTests | ( | void | ) |
Definition at line 205 of file thread-storage.c.
References UtRegisterTest().
void* ThreadAllocStorageById | ( | ThreadVars * | tv, |
ThreadStorageId | id | ||
) |
Definition at line 40 of file thread-storage.c.
References ThreadVars_::storage, storage_type, StorageAllocByIdPrealloc(), and tv.
void ThreadFreeStorage | ( | ThreadVars * | tv | ) |
Definition at line 50 of file thread-storage.c.
References ThreadVars_::storage, storage_type, StorageFreeAll(), ThreadStorageSize(), and tv.
void ThreadFreeStorageById | ( | ThreadVars * | tv, |
ThreadStorageId | id | ||
) |
Definition at line 45 of file thread-storage.c.
References ThreadVars_::storage, storage_type, StorageFreeById(), and tv.
void* ThreadGetStorageById | ( | const ThreadVars * | tv, |
ThreadStorageId | id | ||
) |
Definition at line 30 of file thread-storage.c.
References ThreadVars_::storage, storage_type, StorageGetById(), and tv.
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.
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().
unsigned int ThreadStorageSize | ( | void | ) |
Definition at line 25 of file thread-storage.c.
References storage_type, and StorageGetSize().
Referenced by ThreadFreeStorage(), and TmThreadCreate().