From cb8f5f9ebbf9d6e64d599a878f9f2f1bae20a163 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sat, 1 Mar 2014 16:00:36 -0500 Subject: [PATCH] ck_hp_fifo: Add deinit routine to allow reclaiming stub node. --- include/ck_hp_fifo.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/ck_hp_fifo.h b/include/ck_hp_fifo.h index f2fae31..59bf0e4 100644 --- a/include/ck_hp_fifo.h +++ b/include/ck_hp_fifo.h @@ -65,6 +65,15 @@ ck_hp_fifo_init(struct ck_hp_fifo *fifo, struct ck_hp_fifo_entry *stub) return; } +CK_CC_INLINE static void +ck_hp_fifo_deinit(struct ck_hp_fifo *fifo, struct ck_hp_fifo_entry **stub) +{ + + *stub = fifo->head; + fifo->head = fifo->tail = NULL; + return; +} + CK_CC_INLINE static void ck_hp_fifo_enqueue_mpmc(ck_hp_record_t *record, struct ck_hp_fifo *fifo,