summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-07-22 17:00:21 +0800
committerMeco Man <[email protected]>2021-07-22 18:24:56 +0800
commita8ed7b776995598c7d4443735ed7dbdcb8bd967e (patch)
tree6d0a48ad318a5c5ad00a6a1dadb6203d392bceb1 /components
parent73bd7a7d66898c612380cbf64d1574c3b0764fdc (diff)
[workqueue] 将rt_work_sys_workqueue_init函数私有化
Diffstat (limited to 'components')
-rw-r--r--components/drivers/include/ipc/workqueue.h5
-rw-r--r--components/drivers/src/workqueue.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/components/drivers/include/ipc/workqueue.h b/components/drivers/include/ipc/workqueue.h
index 03d38b2f4d..a156145641 100644
--- a/components/drivers/include/ipc/workqueue.h
+++ b/components/drivers/include/ipc/workqueue.h
@@ -69,7 +69,7 @@ rt_err_t rt_workqueue_critical_work(struct rt_workqueue *queue, struct rt_work *
#ifdef RT_USING_SYSTEM_WORKQUEUE
rt_err_t rt_work_submit(struct rt_work *work, rt_tick_t time);
rt_err_t rt_work_cancel(struct rt_work *work);
-#endif
+#endif /* RT_USING_SYSTEM_WORKQUEUE */
rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_work *work, void *work_data),
void *work_data)
@@ -85,7 +85,6 @@ 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 /* RT_USING_HEAP */
#endif
diff --git a/components/drivers/src/workqueue.c b/components/drivers/src/workqueue.c
index f195dad927..065c505015 100644
--- a/components/drivers/src/workqueue.c
+++ b/components/drivers/src/workqueue.c
@@ -358,7 +358,7 @@ rt_err_t rt_work_cancel(struct rt_work *work)
return rt_workqueue_cancel_work(sys_workq, work);
}
-int rt_work_sys_workqueue_init(void)
+static int rt_work_sys_workqueue_init(void)
{
if (sys_workq != RT_NULL)
return RT_EOK;
@@ -370,5 +370,5 @@ int rt_work_sys_workqueue_init(void)
return RT_EOK;
}
INIT_PREV_EXPORT(rt_work_sys_workqueue_init);
-#endif
-#endif
+#endif /* RT_USING_SYSTEM_WORKQUEUE */
+#endif /* RT_USING_HEAP */