Initial cut of the open ath9k htc firmware.
[open-ath9k-htc-firmware.git] / target_firmware / magpie_fw_dev / target / inc / k2 / tasklet_api.h
1 #ifndef __TASKLET_API_H__
2 #define __TASKLET_API_H__
3
4 typedef void (*A_TASKLET_FUNC)(void *arg);
5
6 #define A_TASKLET_STATE_DISABLE         0
7 #define A_TASKLET_STATE_SCHEDULED       1
8 #define A_TASKLET_STATE_RUNNING         2
9
10 struct _tasklet {
11         A_TASKLET_FUNC func;
12         void *arg;
13         int  state;
14         struct _tasklet *next;
15 };
16
17 typedef struct _tasklet A_tasklet_t;
18
19 struct tasklet_api {
20         void (* _tasklet_init)(void);
21         void (* _tasklet_init_task)(A_TASKLET_FUNC, void * arg, A_tasklet_t *);
22         void (* _tasklet_disable)(A_tasklet_t *);
23         void (* _tasklet_schedule)(A_tasklet_t *);
24         void (* _tasklet_run)(void);
25 };
26 #endif /* __TASKLET_API_H__ */