From 49c4200a9e313d775a90cc3b6c3b79b18e8e0367 Mon Sep 17 00:00:00 2001 From: Tom Keiser Date: Thu, 11 Mar 2010 10:38:31 -0600 Subject: [PATCH] Provide a queue_NodeInit() interface Provide a queue_NodeInit() interface for the rx queue package. Change-Id: I85f6caf3605b9a88113ff4d904012ed2aa12a679 Reviewed-on: http://gerrit.openafs.org/1860 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/rx/rx_queue.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rx/rx_queue.h b/src/rx/rx_queue.h index 1e930a6765..0befd0c6ef 100644 --- a/src/rx/rx_queue.h +++ b/src/rx/rx_queue.h @@ -93,6 +93,9 @@ for (n=0, queue_Scan(&myqueue, qe, nqe, myelement), n++) {} /* Initialize a queue head (*q). A queue head is just a queue element */ #define queue_Init(q) (_RXQ(q))->prev = (_RXQ(q))->next = (_RXQ(q)) +/* initialize a node in the queue */ +#define queue_NodeInit(q) ((_RXQ(q))->prev = (_RXQ(q))->next = NULL) + /* Prepend a queue element (*i) to the head of the queue, after the queue head (*q). The new queue element should not currently be on any list. */ #define queue_Prepend(q,i) _RXQA(_RXQ(q),_RXQ(i),next,prev)