Lines Matching refs:job
82 ASYNC_JOB *job = NULL;
84 job = OPENSSL_zalloc(sizeof(*job));
85 if (job == NULL) {
90 job->status = ASYNC_JOB_RUNNING;
92 return job;
95 static void async_job_free(ASYNC_JOB *job)
97 if (job != NULL) {
98 OPENSSL_free(job->funcargs);
99 async_fibre_free(&job->fibrectx);
100 OPENSSL_free(job);
105 ASYNC_JOB *job;
119 job = sk_ASYNC_JOB_pop(pool->jobs);
120 if (job == NULL) {
125 job = async_job_new();
126 if (job != NULL) {
127 if (! async_fibre_makecontext(&job->fibrectx)) {
128 async_job_free(job);
134 return job;
137 static void async_release_job(ASYNC_JOB *job) {
145 OPENSSL_free(job->funcargs);
146 job->funcargs = NULL;
147 sk_ASYNC_JOB_push(pool->jobs, job);
152 ASYNC_JOB *job;
160 /* Run the job */
161 job = ctx->currjob;
162 job->ret = job->func(job->funcargs);
164 /* Stop the job */
165 job->status = ASYNC_JOB_STOPPING;
166 if (!async_fibre_swapcontext(&job->fibrectx,
177 int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *wctx, int *ret,
192 if (*job != NULL)
193 ctx->currjob = *job;
202 *job = NULL;
207 *job = ctx->currjob;
214 if (*job == NULL)
216 ctx->currjob = *job;
228 /* Resume previous job */
248 *job = NULL;
252 /* Start a new job */
287 *job = NULL;
293 ASYNC_JOB *job;
300 * Could be we've deliberately not been started within a job so this is
306 job = ctx->currjob;
307 job->status = ASYNC_JOB_PAUSING;
309 if (!async_fibre_swapcontext(&job->fibrectx,
315 async_wait_ctx_reset_counts(job->waitctx);
322 ASYNC_JOB *job;
328 job = sk_ASYNC_JOB_pop(pool->jobs);
329 async_job_free(job);
330 } while (job);
385 ASYNC_JOB *job;
386 job = async_job_new();
387 if (job == NULL || !async_fibre_makecontext(&job->fibrectx)) {
392 async_job_free(job);
395 job->funcargs = NULL;
396 sk_ASYNC_JOB_push(pool->jobs, job); /* Cannot fail due to reserve */
449 ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job)
451 return job->waitctx;
464 * We're not in a job anyway so ignore this
481 * We're not in a job anyway so ignore this