Sync with the new ipfw3 version.
[ipfw.git] / dummynet2 / include / sys / taskqueue.h
1 #ifndef _SYS_TASKQUEUE_H_
2 #define _SYS_TASKQUEUE_H_
3
4 /*
5  * Remap taskqueue to direct calls
6  */
7
8 #ifdef _WIN32
9 struct task {
10         void (*func)(void*, int);
11 };
12 #define taskqueue_enqueue(tq, ta)       (ta)->func(NULL,1)
13 #define TASK_INIT(a,b,c,d) do {                                 \
14         (a)->func = (c); } while (0)
15 #else
16 struct task {
17         void (*func)(void);
18 };
19 #define taskqueue_enqueue(tq, ta)       (ta)->func()
20 #define TASK_INIT(a,b,c,d) do {                                 \
21         (a)->func = (void (*)(void))c; } while (0)
22
23 #endif
24 #define taskqueue_create_fast(_a, _b, _c, _d)   NULL
25 #define taskqueue_start_threads(_a, _b, _c, _d)
26
27 #define taskqueue_drain(_a, _b) /* XXX to be completed */
28 #define taskqueue_free(_a)      /* XXX to be completed */
29
30 #define PRI_MIN                 (0)             /* Highest priority. */
31 #define PRI_MIN_ITHD            (PRI_MIN)
32 #define PI_NET                  (PRI_MIN_ITHD + 16)
33
34 #endif /* !_SYS_TASKQUEUE_H_ */