Lines Matching defs:item
44 struct work_queue_item *item;
47 item = XCALLOC (MTYPE_WORK_QUEUE_ITEM,
50 return item;
54 work_queue_item_free (struct work_queue_item *item)
56 XFREE (MTYPE_WORK_QUEUE_ITEM, item);
129 struct work_queue_item *item;
133 if (!(item = work_queue_item_new (wq)))
135 zlog_err ("%s: unable to get new queue item", __func__);
139 item->data = data;
140 listnode_add (wq->items, item);
150 struct work_queue_item *item = listgetdata (ln);
152 assert (item && item->data);
156 wq->spec.del_item_data (wq, item->data);
159 work_queue_item_free (item);
245 struct work_queue_item *item;
276 for (ALL_LIST_ELEMENTS (wq->items, node, nnode, item))
278 assert (item && item->data);
281 if (item->ran > wq->spec.max_retries)
285 wq->spec.errorfunc (wq, item->data);
293 ret = wq->spec.workfunc (wq, item->data);
294 item->ran++;
297 && (item->ran < wq->spec.max_retries));
303 /* decrement item->ran again, cause this isn't an item
306 item->ran--;
314 item->ran--;
323 wq->spec.errorfunc (wq, item);