Merge pull request #4881 from mysterywolf/syswork

[workqueue] 将rt_work_sys_workqueue_init函数设为私有
This commit is contained in:
Bernard Xiong 2021-07-23 17:37:01 +08:00 committed by GitHub
commit 2b201cbb00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -69,7 +69,7 @@ rt_err_t rt_workqueue_critical_work(struct rt_workqueue *queue, struct rt_work *
#ifdef RT_USING_SYSTEM_WORKQUEUE #ifdef RT_USING_SYSTEM_WORKQUEUE
rt_err_t rt_work_submit(struct rt_work *work, rt_tick_t time); rt_err_t rt_work_submit(struct rt_work *work, rt_tick_t time);
rt_err_t rt_work_cancel(struct rt_work *work); 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), rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_work *work, void *work_data),
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 rt_delayed_work_init(struct rt_delayed_work *work, void (*work_func)(struct rt_work *work,
void *work_data), void *work_data); void *work_data), void *work_data);
int rt_work_sys_workqueue_init(void); #endif /* RT_USING_HEAP */
#endif
#endif #endif

View File

@ -358,7 +358,7 @@ rt_err_t rt_work_cancel(struct rt_work *work)
return rt_workqueue_cancel_work(sys_workq, 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) if (sys_workq != RT_NULL)
return RT_EOK; return RT_EOK;
@ -370,5 +370,5 @@ int rt_work_sys_workqueue_init(void)
return RT_EOK; return RT_EOK;
} }
INIT_PREV_EXPORT(rt_work_sys_workqueue_init); INIT_PREV_EXPORT(rt_work_sys_workqueue_init);
#endif #endif /* RT_USING_SYSTEM_WORKQUEUE */
#endif #endif /* RT_USING_HEAP */