Add workq xtype implementation
[archipelago] / xseg / xtypes / xworkq.h
1 #ifndef __X_WORK_H
2 #define __X_WORK_H
3
4 #include <xtypes/xq.h>
5 #include <xtypes/xwork.h>
6
7 struct xworkq {
8         struct xlock q_lock;
9         uint32_t flags;
10         struct xq *q;
11         struct xlock *lock;
12 };
13
14 int xworkq_init(struct xworkq *wq, struct xlock * lock,  uint32_t flags);
15 int xworkq_enqueue(struct xworkq *wq, void (*job_fn)(void *q, void *arg), void *job);
16 void xworkq_signal(struct xworkq *wq);
17 void xworkq_destroy(struct xworkq *wq);
18
19
20
21 #endif /* __X_WORK_H */