Go to the documentation of this file.
24 #ifndef SURICATA_FLOW_QUEUE_H
25 #define SURICATA_FLOW_QUEUE_H
36 #error Cannot enable both FQLOCK_SPIN and FQLOCK_MUTEX
54 #elif defined FQLOCK_SPIN
57 #error Enable FQLOCK_SPIN or FQLOCK_MUTEX
65 #define FQLOCK_INIT(q) SCSpinInit(&(q)->s, 0)
66 #define FQLOCK_DESTROY(q) SCSpinDestroy(&(q)->s)
67 #define FQLOCK_LOCK(q) SCSpinLock(&(q)->s)
68 #define FQLOCK_TRYLOCK(q) SCSpinTrylock(&(q)->s)
69 #define FQLOCK_UNLOCK(q) SCSpinUnlock(&(q)->s)
70 #elif defined FQLOCK_MUTEX
71 #define FQLOCK_INIT(q) SCMutexInit(&(q)->m, NULL)
72 #define FQLOCK_DESTROY(q) SCMutexDestroy(&(q)->m)
73 #define FQLOCK_LOCK(q) SCMutexLock(&(q)->m)
74 #define FQLOCK_TRYLOCK(q) SCMutexTrylock(&(q)->m)
75 #define FQLOCK_UNLOCK(q) SCMutexUnlock(&(q)->m)
77 #error Enable FQLOCK_SPIN or FQLOCK_MUTEX
void FlowQueuePrivatePrependFlow(FlowQueuePrivate *fqc, Flow *f)
FlowQueuePrivate FlowQueueExtractPrivate(FlowQueue *fq)
Flow * FlowQueuePrivateGetFromTop(FlowQueuePrivate *fqp)
void FlowQueueDestroy(FlowQueue *)
Destroy a flow queue.
struct FlowQueue_ FlowQueue
FlowQueue * FlowQueueNew(void)
void FlowQueuePrivateAppendFlow(FlowQueuePrivate *fqc, Flow *f)
FlowQueue * FlowQueueInit(FlowQueue *)
SC_ATOMIC_DECLARE(bool, non_empty)
Flow * FlowDequeue(FlowQueue *)
remove a flow from the queue
struct FlowQueuePrivate_ FlowQueuePrivate
void FlowEnqueue(FlowQueue *, Flow *)
add a flow to a queue
void FlowQueueRemove(FlowQueue *fq, Flow *f)
void FlowQueueAppendPrivate(FlowQueue *fq, FlowQueuePrivate *fqp)
void FlowQueuePrivateAppendPrivate(FlowQueuePrivate *dest, FlowQueuePrivate *src)