MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / executor_worker_task

Function executor_worker_task

libavutil/executor.c:99–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98#if HAVE_THREADS
99static void *executor_worker_task(void *data)
100{
101 ThreadInfo *ti = (ThreadInfo*)data;
102 AVExecutor *e = ti->e;
103 void *lc = e->local_contexts + (ti - e->threads) * e->cb.local_context_size;
104
105 ff_mutex_lock(&e->lock);
106 while (1) {
107 if (e->die) break;
108
109 if (!run_one_task(e, lc)) {
110 //no task in one loop
111 ff_cond_wait(&e->cond, &e->lock);
112 }
113 }
114 ff_mutex_unlock(&e->lock);
115 return NULL;
116}
117#endif
118
119static void executor_free(AVExecutor *e, const int has_lock, const int has_cond)

Callers

nothing calls this directly

Calls 4

ff_mutex_lockFunction · 0.85
ff_cond_waitFunction · 0.85
ff_mutex_unlockFunction · 0.85
run_one_taskFunction · 0.70

Tested by

no test coverage detected