4
typedef struct HWThreadT *HWThread;
5
typedef int (*HWRunFunction)(HWThread thread, void *ctx, int block, void *attr);
6
typedef int (*HWFreeFunction)(void *ctx);
10
enum HWThreadStatusT {
11
HW_THREAD_STATUS_IDLE = 0,
12
HW_THREAD_STATUS_RUNNING = 1,
13
HW_THREAD_STATUS_DONE = 2,
14
HW_THREAD_STATUS_INIT = 3
16
typedef enum HWThreadStatusT HWThreadStatus;
19
#ifndef HW_HIDE_DETAILS
31
HWThreadStatus status;
33
void *data; /**< Per-thread data storage, will be free'd if set */
35
typedef struct HWThreadT HWThreadS;
36
#endif /* HW_HIDE_DETAILS */
38
HWThread hw_thread_create(HWSched sched, int thread_id, void *hwctx, HWRunFunction *run_func, HWFreeFunction free_func);
39
void hw_thread_destroy(HWThread ctx);
42
#endif /* _HW_THREAD_H */