lqueue: Allow a queueu to be initialized from an existing back element
There are occasional cases where you might construct a valid queue, and
retain a direct pointer to the back element, but not the struct lqueue
used to build it.
This patch adds a new lqueue_init_from_back() macro to reconstruct a valid
struct lqueue from the element pointer for cases like this.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Showing
Please register or sign in to comment