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 <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Tom Keiser 2010-03-11 10:38:31 -06:00 committed by Derrick Brashear
parent cec1b09ff7
commit 49c4200a9e

View File

@ -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)