11 unsigned int nr_pending; /**< number of messages in the queue */
12 struct fwp_msgb* queue[FWP_MSGQ_SIZE];
13 unsigned int in; /**< add at offset (in % size) */
14 unsigned int out; /**< extracted from offset (out % size) */
15 pthread_mutex_t lock; /**< queue lock */
16 sem_t empty_lock; /**< semaphore to block on empty mqueue */
18 /* queue reject policy */
19 /*queue_rejection_policy qr_policy;*/
22 void fwp_msgq_init(struct fwp_msgq *msgq);
24 int fwp_msgq_enqueue(struct fwp_msgq *msgq, struct fwp_msgb* msgb);
26 struct fwp_msgb* fwp_msgq_dequeue(struct fwp_msgq *msgq);
27 void fwp_msgq_dequeue_all(struct fwp_msgq *msgq);
29 /* void fwp_msgq_setpolicy */
31 #endif /* _FWP_MSGQ_H */