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