Skip to content

Commit 2b201cb

Browse files
authored
Merge pull request #4881 from mysterywolf/syswork
[workqueue] 将rt_work_sys_workqueue_init函数设为私有
2 parents abf3db6 + a8ed7b7 commit 2b201cb

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

components/drivers/include/ipc/workqueue.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ rt_err_t rt_workqueue_critical_work(struct rt_workqueue *queue, struct rt_work *
6969
#ifdef RT_USING_SYSTEM_WORKQUEUE
7070
rt_err_t rt_work_submit(struct rt_work *work, rt_tick_t time);
7171
rt_err_t rt_work_cancel(struct rt_work *work);
72-
#endif
72+
#endif /* RT_USING_SYSTEM_WORKQUEUE */
7373

7474
rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_work *work, void *work_data),
7575
void *work_data)
@@ -85,7 +85,6 @@ rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_wo
8585
void rt_delayed_work_init(struct rt_delayed_work *work, void (*work_func)(struct rt_work *work,
8686
void *work_data), void *work_data);
8787

88-
int rt_work_sys_workqueue_init(void);
89-
#endif
88+
#endif /* RT_USING_HEAP */
9089

9190
#endif

components/drivers/src/workqueue.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ rt_err_t rt_work_cancel(struct rt_work *work)
358358
return rt_workqueue_cancel_work(sys_workq, work);
359359
}
360360

361-
int rt_work_sys_workqueue_init(void)
361+
static int rt_work_sys_workqueue_init(void)
362362
{
363363
if (sys_workq != RT_NULL)
364364
return RT_EOK;
@@ -370,5 +370,5 @@ int rt_work_sys_workqueue_init(void)
370370
return RT_EOK;
371371
}
372372
INIT_PREV_EXPORT(rt_work_sys_workqueue_init);
373-
#endif
374-
#endif
373+
#endif /* RT_USING_SYSTEM_WORKQUEUE */
374+
#endif /* RT_USING_HEAP */

0 commit comments

Comments
 (0)