diff options
| author | Bernard Xiong <[email protected]> | 2019-08-07 13:30:24 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-08-07 13:30:24 +0800 |
| commit | ab37857609e4f7692b0688fb9e8da2021ddc0bd8 (patch) | |
| tree | dcda606df184b43ed591ecd984a03ff8db0eba97 /components/drivers/include | |
| parent | 5d4129db80fa4b823c8d03536e6ad9d5531d2ebb (diff) | |
| parent | badd2114575190d8ec4ab9ee0e71f6452d2bf666 (diff) | |
Merge pull request #2922 from enkiller/workqueu
[components][drivers][ipc] 完善工作队列,增强稳定性
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/ipc/workqueue.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/drivers/include/ipc/workqueue.h b/components/drivers/include/ipc/workqueue.h index 354a30c04e..23e256c420 100644 --- a/components/drivers/include/ipc/workqueue.h +++ b/components/drivers/include/ipc/workqueue.h @@ -43,13 +43,13 @@ struct rt_work void *work_data; rt_uint16_t flags; rt_uint16_t type; + struct rt_timer timer; + struct rt_workqueue *workqueue; }; struct rt_delayed_work { struct rt_work work; - struct rt_timer timer; - struct rt_workqueue *workqueue; }; #ifdef RT_USING_HEAP @@ -74,6 +74,7 @@ rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_wo rt_list_init(&(work->list)); work->work_func = work_func; work->work_data = work_data; + work->workqueue = RT_NULL; work->flags = 0; work->type = 0; } @@ -81,6 +82,7 @@ rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_wo void rt_delayed_work_init(struct rt_delayed_work *work, void (*work_func)(struct rt_work *work, void *work_data), void *work_data); +int rt_work_sys_workqueue_init(void); #endif #endif |
