Lines Matching full:job
41 tpool_job_t *job; in delete_pool() local
62 for (job = tpool->tp_head; job != NULL; job = tpool->tp_head) { in delete_pool()
63 tpool->tp_head = job->tpj_next; in delete_pool()
64 free(job); in delete_pool()
101 * Called by a worker thread on return from a tpool_dispatch()d job.
129 tpool_job_t *job; in tpool_worker() local
179 if ((job = tpool->tp_head) != NULL && in tpool_worker()
182 func = job->tpj_func; in tpool_worker()
183 arg = job->tpj_arg; in tpool_worker()
184 tpool->tp_head = job->tpj_next; in tpool_worker()
185 if (job == tpool->tp_tail) in tpool_worker()
192 free(job); in tpool_worker()
410 * Else just return with the job added to the queue.
415 tpool_job_t *job; in tpool_dispatch() local
419 if ((job = calloc(1, sizeof (*job))) == NULL) in tpool_dispatch()
421 job->tpj_next = NULL; in tpool_dispatch()
422 job->tpj_func = func; in tpool_dispatch()
423 job->tpj_arg = arg; in tpool_dispatch()
441 free(job); in tpool_dispatch()
448 tpool->tp_head = job; in tpool_dispatch()
450 tpool->tp_tail->tpj_next = job; in tpool_dispatch()
451 tpool->tp_tail = job; in tpool_dispatch()
469 * Calling tpool_destroy() from a job in the pool will cause deadlock.
530 * Calling tpool_wait() from a job in the pool will cause deadlock.