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

Function grouptask_block

freebsd/kern/subr_gtaskqueue.c:190–206  ·  view source on GitHub ↗

* Wait for all to complete, then prevent it from being enqueued */

Source from the content-addressed store, hash-verified

188 * Wait for all to complete, then prevent it from being enqueued
189 */
190void
191grouptask_block(struct grouptask *grouptask)
192{
193 struct gtaskqueue *queue = grouptask->gt_taskqueue;
194 struct gtask *gtask = &grouptask->gt_task;
195
196#ifdef INVARIANTS
197 if (queue == NULL) {
198 gtask_dump(gtask);
199 panic("queue == NULL");
200 }
201#endif
202 TQ_LOCK(queue);
203 gtask->ta_flags |= TASK_NOENQUEUE;
204 gtaskqueue_drain_locked(queue, gtask);
205 TQ_UNLOCK(queue);
206}
207
208void
209grouptask_unblock(struct grouptask *grouptask)

Callers 1

taskqgroup_detachFunction · 0.85

Calls 3

gtask_dumpFunction · 0.85
gtaskqueue_drain_lockedFunction · 0.85
panicFunction · 0.70

Tested by

no test coverage detected