Go to the documentation of this file.
24 #ifndef __IPPAIR_QUEUE_H__
25 #define __IPPAIR_QUEUE_H__
36 #error Cannot enable both HQLOCK_SPIN and HQLOCK_MUTEX
51 #elif defined HQLOCK_SPIN
54 #error Enable HQLOCK_SPIN or HQLOCK_MUTEX
59 #define HQLOCK_INIT(q) SCSpinInit(&(q)->s, 0)
60 #define HQLOCK_DESTROY(q) SCSpinDestroy(&(q)->s)
61 #define HQLOCK_LOCK(q) SCSpinLock(&(q)->s)
62 #define HQLOCK_TRYLOCK(q) SCSpinTrylock(&(q)->s)
63 #define HQLOCK_UNLOCK(q) SCSpinUnlock(&(q)->s)
64 #elif defined HQLOCK_MUTEX
65 #define HQLOCK_INIT(q) SCMutexInit(&(q)->m, NULL)
66 #define HQLOCK_DESTROY(q) SCMutexDestroy(&(q)->m)
67 #define HQLOCK_LOCK(q) SCMutexLock(&(q)->m)
68 #define HQLOCK_TRYLOCK(q) SCMutexTrylock(&(q)->m)
69 #define HQLOCK_UNLOCK(q) SCMutexUnlock(&(q)->m)
71 #error Enable HQLOCK_SPIN or HQLOCK_MUTEX
void IPPairQueueDestroy(IPPairQueue *)
Destroy a ippair queue.
IPPairQueue * IPPairQueueNew(void)
IPPairQueue * IPPairQueueInit(IPPairQueue *)
IPPair * IPPairDequeue(IPPairQueue *)
remove a ippair from the queue
uint32_t IPPairQueueLen(IPPairQueue *)
struct IPPairQueue_ IPPairQueue
void IPPairEnqueue(IPPairQueue *, IPPair *)
add a ippair to a queue