| 97 | |
| 98 | #if HAVE_THREADS |
| 99 | static 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 | |
| 119 | static void executor_free(AVExecutor *e, const int has_lock, const int has_cond) |
nothing calls this directly
no test coverage detected