1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* 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 */
|