summaryrefslogtreecommitdiff
path: root/components/drivers/include/ipc/workqueue.h
diff options
context:
space:
mode:
authorHubretXie <[email protected]>2019-08-16 21:28:29 +0800
committerGitHub <[email protected]>2019-08-16 21:28:29 +0800
commit9662e18c3688681cd95ebd65242773dbe7c1366b (patch)
treeeb5b5326efc603b359d8758ee6cd17eebfb1fa75 /components/drivers/include/ipc/workqueue.h
parent56a65431dc830d6234a8a3286fea35664a65aeb1 (diff)
parent3b252d5b9721bb7cc649dad832507937efc1e96c (diff)
Merge pull request #7 from RT-Thread/master
sync
Diffstat (limited to 'components/drivers/include/ipc/workqueue.h')
-rw-r--r--components/drivers/include/ipc/workqueue.h6
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