/* * vim: ft=c */ #ifndef PARPAT_H #define PARPAT_H #include "queue.h" typedef int (emitter)(void **, void *); typedef void *(worker)(void *, void *); typedef void *(collector)(void *, void *, void *); typedef void *(queue_emitter)(queue *, void *); typedef void *(queue_worker)(queue *, queue *, void *); typedef void *(queue_collector)(queue *, void *); void *create_farm(emitter *efn, worker *wfn, collector *cfn, int n, void *efn_arg, void *wfn_arg, void *cfn_arg); void *create_pipeline(emitter *efn, worker **wfns, int n, collector *cfn, void *efn_arg, void **wfn_args, void *cfn_arg); void *install_farm(worker *wfn, int n, queue *in, queue *out, void *arg); void *install_pipeline(worker **wfns, int n, queue *in, queue *out, void **args); void *install_farm_queue(queue_worker *wfn, int n, queue *in, queue *out, void *arg); void *install_queue_pipeline(queue_worker **wfns, int n, queue *in, queue *out, void **args); void *create_queue_base(queue_emitter *efn, queue_worker *wfn, queue_collector *cfn, void *efn_arg, void *wfn_arg, void *cfn_arg); #endif /* PARPAT_H */