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

Function task_free

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

* NOTE: Must be called with tq->tq_lock held, expects the taskq_ent_t * to already be removed from the free, work, or pending taskq lists. */

Source from the content-addressed store, hash-verified

172 * to already be removed from the free, work, or pending taskq lists.
173 */
174static void
175task_free(taskq_t *tq, taskq_ent_t *t)
176{
177 ASSERT(tq);
178 ASSERT(t);
179 ASSERT(list_empty(&t->tqent_list));
180 ASSERT(!timer_pending(&t->tqent_timer));
181
182 kmem_free(t, sizeof (taskq_ent_t));
183 tq->tq_nalloc--;
184}
185
186/*
187 * NOTE: Must be called with tq->tq_lock held, either destroys the

Callers 2

task_doneFunction · 0.70
taskq_destroyFunction · 0.70

Calls 2

list_emptyFunction · 0.85
kmem_freeFunction · 0.50

Tested by

no test coverage detected