MCPcopy Create free account
hub / github.com/F-Stack/f-stack / task_done

Function task_done

freebsd/contrib/openzfs/module/os/linux/spl/spl-taskq.c:190–211  ·  view source on GitHub ↗

* NOTE: Must be called with tq->tq_lock held, either destroys the * taskq_ent_t if too many exist or moves it to the free list for later use. */

Source from the content-addressed store, hash-verified

188 * taskq_ent_t if too many exist or moves it to the free list for later use.
189 */
190static void
191task_done(taskq_t *tq, taskq_ent_t *t)
192{
193 ASSERT(tq);
194 ASSERT(t);
195
196 /* Wake tasks blocked in taskq_wait_id() */
197 wake_up_all(&t->tqent_waitq);
198
199 list_del_init(&t->tqent_list);
200
201 if (tq->tq_nalloc <= tq->tq_minalloc) {
202 t->tqent_id = TASKQID_INVALID;
203 t->tqent_func = NULL;
204 t->tqent_arg = NULL;
205 t->tqent_flags = 0;
206
207 list_add_tail(&t->tqent_list, &tq->tq_free_list);
208 } else {
209 task_free(tq, t);
210 }
211}
212
213/*
214 * When a delayed task timer expires remove it from the delay list and

Callers 3

taskq_cancel_idFunction · 0.85
taskq_threadFunction · 0.85
taskq_createFunction · 0.85

Calls 3

list_del_initFunction · 0.85
task_freeFunction · 0.70
list_add_tailFunction · 0.50

Tested by

no test coverage detected