#include "config.h"
#include "mem.h"
#include "thread.h"
#include "executor.h"
#if !HAVE_THREADS
#define ExecutorThread …
#define executor_thread_create …
#define executor_thread_join …
#else
#define ExecutorThread …
#define executor_thread_create(t, a, s, ar) …
#define executor_thread_join(t, r) …
#endif
ThreadInfo;
struct AVExecutor { … };
static AVTask* remove_task(AVTask **prev, AVTask *t)
{ … }
static void add_task(AVTask **prev, AVTask *t)
{ … }
static int run_one_task(AVExecutor *e, void *lc)
{ … }
#if HAVE_THREADS
static void *executor_worker_task(void *data)
{ … }
#endif
static void executor_free(AVExecutor *e, const int has_lock, const int has_cond)
{ … }
AVExecutor* av_executor_alloc(const AVTaskCallbacks *cb, int thread_count)
{ … }
void av_executor_free(AVExecutor **executor)
{ … }
void av_executor_execute(AVExecutor *e, AVTask *t)
{ … }