Signed-off-by: Pierre Habouzit <madcoder@debian.org>
el_mode emode : 3;
int (*llp)(struct job_t *);
- struct machine_t *m;
+ const struct machine_t *m;
void *ptr;
} job_t;
DO_INIT(job_t, job);
__must_check__ int el_job_connect(job_t *w, struct sockaddr *, socklen_t len,
int type, int proto);
+static inline job_t *el_job_start(const machine_t *m, void *cfg) {
+ job_t *w = job_new();
+ w->m = m;
+ return m->setup(w, cfg) < 0 ? NULL : w;
+}
+
int el_dispatch(int timeout);
#endif