diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-07-18 06:12:31 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-07-18 06:12:31 +0000 |
commit | c01ed5ad9b8efe5ad81033beca2265f4439478cf (patch) | |
tree | 0904a30ac51f99eda3f17170bbf2119832932eca /sys/sys/_task.h | |
parent | 25c768ed0d41f278c879042abdae848099ab619e (diff) | |
download | FreeBSD-src-c01ed5ad9b8efe5ad81033beca2265f4439478cf.zip FreeBSD-src-c01ed5ad9b8efe5ad81033beca2265f4439478cf.tar.gz |
import vendor fixes to cxgb
Diffstat (limited to 'sys/sys/_task.h')
-rw-r--r-- | sys/sys/_task.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/sys/sys/_task.h b/sys/sys/_task.h index 2a51e1b..5e1205e 100644 --- a/sys/sys/_task.h +++ b/sys/sys/_task.h @@ -38,13 +38,31 @@ * times the task was enqueued before the call to taskqueue_run(). */ typedef void task_fn_t(void *context, int pending); +typedef int task_drv_fn_t(void *context, int pending); struct task { STAILQ_ENTRY(task) ta_link; /* link for queue */ - u_short ta_pending; /* count times queued */ - u_short ta_priority; /* Priority */ - task_fn_t *ta_func; /* task handler */ + u_short ta_pending; /* count times queued */ + u_short ta_priority; /* Priority */ + uint16_t ta_ppending; /* previous pending value */ + uint8_t ta_rc; /* last return code */ + uint8_t ta_flags; /* flag state */ + union { + task_fn_t *_ta_func; /* task handler */ + task_drv_fn_t *_ta_drv_func; /* task handler */ + } u; + void *ta_context; /* argument for handler */ }; +#define ta_func u._ta_func +#define ta_drv_func u._ta_drv_func + + +#define TA_COMPLETE 0x0 +#define TA_NO_DEQUEUE 0x1 + +#define TA_REFERENCED (1 << 0) + + #endif /* !_SYS__TASK_H_ */ |