Change the dataplane context dequeue api used by zebra to make the
purpose a bit clearer.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
}
/* Dequeue a context block from the head of a list */
-void dplane_ctx_dequeue(struct dplane_ctx_q *q, struct zebra_dplane_ctx **ctxp)
+struct zebra_dplane_ctx *dplane_ctx_dequeue(struct dplane_ctx_q *q)
{
struct zebra_dplane_ctx *ctx = TAILQ_FIRST(q);
if (ctx)
TAILQ_REMOVE(q, ctx, zd_q_entries);
- *ctxp = ctx;
+ return ctx;
}
/*
struct dplane_ctx_q *from_list);
/* Dequeue a context block from the head of caller's tailq */
-void dplane_ctx_dequeue(struct dplane_ctx_q *q, struct zebra_dplane_ctx **ctxp);
+struct zebra_dplane_ctx *dplane_ctx_dequeue(struct dplane_ctx_q *q);
/*
* Accessors for information from the context object
pthread_mutex_lock(&dplane_mutex);
{
/* Dequeue context block */
- dplane_ctx_dequeue(&rib_dplane_q, &ctx);
+ ctx = dplane_ctx_dequeue(&rib_dplane_q);
}
pthread_mutex_unlock(&dplane_mutex);