+static void job_arrau_dtor(job_t **j)
+{
+ if (*j)
+ IGNORE(el_job_release(*j, EL_KILLED));
+}
+
+DO_ARRAY_FUNCS(job_t, job, job_arrau_dtor);
+
+static void job_array_remove(job_array *arr, job_t *j)
+{
+ for (int i = 0; i < arr->len; i++) {
+ if (arr->arr[i] == j) {
+ job_array_take(arr, i);
+ break;
+ }
+ }
+}
+
+job_t *el_job_start(const machine_t *m, void *cfg)
+{
+ job_t *w = job_new();
+ w->m = m;
+ job_array_append(&jobs, w);
+ return m->setup(w, cfg) < 0 ? NULL : w;
+}
+