suricata
|
#include "suricata-common.h"
#include "thread-storage.h"
#include "util-storage.h"
#include "util-unittest.h"
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 |
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().
const StorageEnum storage_type = STORAGE_THREAD |
Definition at line 23 of file thread-storage.c.
Referenced by ThreadAllocStorageById(), ThreadFreeStorage(), ThreadFreeStorageById(), ThreadGetStorageById(), ThreadSetStorageById(), ThreadStorageRegister(), and ThreadStorageSize().