diff options
| author | chenyingchun0312 <[email protected]> | 2021-08-23 18:54:03 +0800 |
|---|---|---|
| committer | chenyingchun0312 <[email protected]> | 2021-08-23 18:54:03 +0800 |
| commit | 39689ea5edfca9dc267cfa125b99d4d86a8a20bd (patch) | |
| tree | 446d9f9d2f7a374f62f06524b36e0cc7cfb7bc24 /components/drivers/include/ipc/workqueue.h | |
| parent | 5e02709c5533b5741b7ae8eae4945c8c43f86beb (diff) | |
| parent | f0c963bf53e03c19bce171c6d52c9a39440cf7c0 (diff) | |
Merge branch 'develop' of https://github.com/chenyingchun0312/rt-thread into develop
Diffstat (limited to 'components/drivers/include/ipc/workqueue.h')
| -rw-r--r-- | components/drivers/include/ipc/workqueue.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/drivers/include/ipc/workqueue.h b/components/drivers/include/ipc/workqueue.h index 03904d852e..776709a8ab 100644 --- a/components/drivers/include/ipc/workqueue.h +++ b/components/drivers/include/ipc/workqueue.h @@ -6,6 +6,7 @@ * Change Logs: * Date Author Notes * 2021-08-01 Meco Man remove rt_delayed_work_init() and rt_delayed_work structure + * 2021-08-14 Jackistang add comments for rt_work_init() */ #ifndef WORKQUEUE_H__ #define WORKQUEUE_H__ @@ -67,6 +68,13 @@ 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 /* RT_USING_SYSTEM_WORKQUEUE */ +/** + * @brief Initialize a work item, binding with a callback function. + * + * @param work A pointer to the work item object. + * @param work_func A callback function that will be called when this work item is executed. + * @param work_data A user data passed to the callback function as the second parameter. + */ rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_work *work, void *work_data), void *work_data) { |
