Lines Matching refs:item
117 // Queue item is freed either when the queue itself is destroyed
118 // or when the item is removed from the queue for dispatch.
119 work_item_t *item = (work_item_t *)malloc(sizeof(work_item_t));
120 if (!item) {
124 item->func = func;
125 item->context = context;
126 fixed_queue_enqueue(thread->work_queue, item);
169 // work item and then joining the thread.
171 work_item_t *item = fixed_queue_try_dequeue(thread->work_queue);
172 while (item && count <= WORK_QUEUE_CAPACITY) {
173 item->func(item->context);
174 free(item);
175 item = fixed_queue_try_dequeue(thread->work_queue);
189 work_item_t *item = fixed_queue_dequeue(queue);
190 item->func(item->context);
191 free(item);