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

Function run_one_task

libavutil/executor.c:79–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79static int run_one_task(AVExecutor *e, void *lc)
80{
81 AVTaskCallbacks *cb = &e->cb;
82 AVTask **prev;
83
84 for (prev = &e->tasks; *prev && !cb->ready(*prev, cb->user_data); prev = &(*prev)->next)
85 /* nothing */;
86 if (*prev) {
87 AVTask *t = remove_task(prev, *prev);
88 if (e->thread_count > 0)
89 ff_mutex_unlock(&e->lock);
90 cb->run(t, lc, cb->user_data);
91 if (e->thread_count > 0)
92 ff_mutex_lock(&e->lock);
93 return 1;
94 }
95 return 0;
96}
97
98#if HAVE_THREADS
99static void *executor_worker_task(void *data)

Callers 2

executor_worker_taskFunction · 0.70
av_executor_executeFunction · 0.70

Calls 3

ff_mutex_unlockFunction · 0.85
ff_mutex_lockFunction · 0.85
remove_taskFunction · 0.70

Tested by

no test coverage detected