* Allocates work object and launches work thread with work_func. * @param jobs Handle to hb_list_t. * @param die Handle to user initiated exit indicator. * @param error Handle to error indicator. */
| 53 | * @param error Handle to error indicator. |
| 54 | */ |
| 55 | hb_thread_t * hb_work_init( hb_list_t * jobs, volatile int * die, hb_error_code * error, hb_job_t ** job ) |
| 56 | { |
| 57 | hb_work_t * work = calloc( sizeof( hb_work_t ), 1 ); |
| 58 | |
| 59 | work->jobs = jobs; |
| 60 | work->current_job = job; |
| 61 | work->die = die; |
| 62 | work->error = error; |
| 63 | |
| 64 | return hb_thread_init( "work", work_func, work, HB_LOW_PRIORITY ); |
| 65 | } |
| 66 | |
| 67 | static void InitWorkState(hb_job_t * job, int pass, int pass_count) |
| 68 | { |
no test coverage detected