24#ifndef SURICATA_DEFRAG_QUEUE_H
25#define SURICATA_DEFRAG_QUEUE_H
36#error Cannot enable both DQLOCK_SPIN and DQLOCK_MUTEX
49#elif defined DQLOCK_SPIN
52#error Enable DQLOCK_SPIN or DQLOCK_MUTEX
57#define DQLOCK_INIT(q) SCSpinInit(&(q)->s, 0)
58#define DQLOCK_DESTROY(q) SCSpinDestroy(&(q)->s)
59#define DQLOCK_LOCK(q) SCSpinLock(&(q)->s)
60#define DQLOCK_TRYLOCK(q) SCSpinTrylock(&(q)->s)
61#define DQLOCK_UNLOCK(q) SCSpinUnlock(&(q)->s)
62#elif defined DQLOCK_MUTEX
63#define DQLOCK_INIT(q) SCMutexInit(&(q)->m, NULL)
64#define DQLOCK_DESTROY(q) SCMutexDestroy(&(q)->m)
65#define DQLOCK_LOCK(q) SCMutexLock(&(q)->m)
66#define DQLOCK_TRYLOCK(q) SCMutexTrylock(&(q)->m)
67#define DQLOCK_UNLOCK(q) SCMutexUnlock(&(q)->m)
69#error Enable DQLOCK_SPIN or DQLOCK_MUTEX
uint32_t DefragTrackerStackSize(DefragTrackerStack *q)
return stack size
void DefragTrackerStackDestroy(DefragTrackerStack *)
Destroy a tracker queue.
DefragTracker * DefragTrackerDequeue(DefragTrackerStack *)
remove a tracker from the queue
void DefragTrackerEnqueue(DefragTrackerStack *, DefragTracker *)
add a tracker to a queue
struct DefragTrackerStack_ DefragTrackerStack
DefragTrackerStack * DefragTrackerStackInit(DefragTrackerStack *)