summaryrefslogtreecommitdiff
path: root/components/drivers/src/workqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/drivers/src/workqueue.c')
-rw-r--r--components/drivers/src/workqueue.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/components/drivers/src/workqueue.c b/components/drivers/src/workqueue.c
index 60472d9ca4..4a776ca485 100644
--- a/components/drivers/src/workqueue.c
+++ b/components/drivers/src/workqueue.c
@@ -211,13 +211,13 @@ static void _delayed_work_timeout_handler(void *parameter)
}
/**
- * @brief Create a work queue, which contains a thread.
+ * @brief Create a work queue with a thread inside.
*
- * @param name The name for work queue thread.
- * @param stack_size The stack size for work queue thread.
- * @param priority The priority for work queue thread.
+ * @param name The name of the work queue thread.
+ * @param stack_size The stack size of the work queue thread.
+ * @param priority The priority of the work queue thread.
*
- * @return Return a pointer to workqueue object. It will return RT_NULL if failed.
+ * @return Return A pointer to the workqueue object. It will return RT_NULL if failed.
*/
struct rt_workqueue *rt_workqueue_create(const char *name, rt_uint16_t stack_size, rt_uint8_t priority)
{
@@ -249,7 +249,7 @@ struct rt_workqueue *rt_workqueue_create(const char *name, rt_uint16_t stack_siz
/**
* @brief Destroy a work queue.
*
- * @param queue A pointer to workqueue object.
+ * @param queue A pointer to the workqueue object.
*
* @return RT_EOK Success.
*/
@@ -266,10 +266,10 @@ rt_err_t rt_workqueue_destroy(struct rt_workqueue *queue)
}
/**
- * @brief Submit a work item to the work queue immediately.
+ * @brief Submit a work item to the work queue without delay.
*
- * @param queue A pointer to workqueue object.
- * @param work A pointer to work item object.
+ * @param queue A pointer to the workqueue object.
+ * @param work A pointer to the work item object.
*
* @return RT_EOK Success.
* @return -RT_EBUSY This work item is executing.
@@ -283,15 +283,15 @@ rt_err_t rt_workqueue_dowork(struct rt_workqueue *queue, struct rt_work *work)
}
/**
- * @brief Submit a work item to the work queue with a delay of time.
+ * @brief Submit a work item to the work queue with a delay.
*
- * @param queue A pointer to workqueue object.
- * @param work A pointer to work item object.
- * @param time This work item will be delayed by time (unit: an OS ticks) before it's been submitted to the work queue.
+ * @param queue A pointer to the workqueue object.
+ * @param work A pointer to the work item object.
+ * @param time The delay time (unit: OS ticks) for the work item to be submitted to the work queue.
*
* @return RT_EOK Success.
* @return -RT_EBUSY This work item is executing.
- * @return -RT_ERROR Time is invalid.
+ * @return -RT_ERROR The time parameter is invalid.
*/
rt_err_t rt_workqueue_submit_work(struct rt_workqueue *queue, struct rt_work *work, rt_tick_t time)
{
@@ -302,10 +302,10 @@ rt_err_t rt_workqueue_submit_work(struct rt_workqueue *queue, struct rt_work *wo
}
/**
- * @brief This function submit a work item to the work queue. This work item will be executed immediately after the current work item is executed.
+ * @brief Submit a work item to the work queue without delay. This work item will be executed after the current work item is executed.
*
- * @param queue A pointer to workqueue object.
- * @param work A pointer to work item object.
+ * @param queue A pointer to the workqueue object.
+ * @param work A pointer to the work item object.
*
* @return RT_EOK Success.
*/
@@ -339,8 +339,8 @@ rt_err_t rt_workqueue_critical_work(struct rt_workqueue *queue, struct rt_work *
/**
* @brief Cancel a work item in the work queue.
*
- * @param queue A pointer to workqueue object.
- * @param work A pointer to work item object.
+ * @param queue A pointer to the workqueue object.
+ * @param work A pointer to the work item object.
*
* @return RT_EOK Success.
* @return -RT_EBUSY This work item is executing.
@@ -353,10 +353,10 @@ rt_err_t rt_workqueue_cancel_work(struct rt_workqueue *queue, struct rt_work *wo
}
/**
- * @brief Cancel a work item in the work queue. If the work item is been executing now, this function will block until it is done.
+ * @brief Cancel a work item in the work queue. If the work item is executing, this function will block until it is done.
*
- * @param queue A pointer to workqueue object.
- * @param work A pointer to work item object.
+ * @param queue A pointer to the workqueue object.
+ * @param work A pointer to the work item object.
*
* @return RT_EOK Success.
*/
@@ -379,9 +379,9 @@ rt_err_t rt_workqueue_cancel_work_sync(struct rt_workqueue *queue, struct rt_wor
}
/**
- * @brief This function will cancel all work item in work queue.
+ * @brief This function will cancel all work items in work queue.
*
- * @param queue A pointer to workqueue object.
+ * @param queue A pointer to the workqueue object.
*
* @return RT_EOK Success.
*/
@@ -413,14 +413,14 @@ rt_err_t rt_workqueue_cancel_all_work(struct rt_workqueue *queue)
static struct rt_workqueue *sys_workq;
/**
- * @brief Submit a work item to the system work queue with a delay of time.
+ * @brief Submit a work item to the system work queue with a delay.
*
- * @param work A pointer to work item object.
- * @param time This work item will be delayed by time (unit: an OS tick) before it's been submitted to system work queue.
+ * @param work A pointer to the work item object.
+ * @param time The delay time (unit: OS ticks) for the work item to be submitted to the work queue.
*
* @return RT_EOK Success.
* @return -RT_EBUSY This work item is executing.
- * @return -RT_ERROR Time is invalid.
+ * @return -RT_ERROR The time parameter is invalid.
*/
rt_err_t rt_work_submit(struct rt_work *work, rt_tick_t time)
{
@@ -428,9 +428,9 @@ rt_err_t rt_work_submit(struct rt_work *work, rt_tick_t time)
}
/**
- * @brief Cancel a work item in system work queue.
+ * @brief Cancel a work item in the system work queue.
*
- * @param work A pointer to work item object.
+ * @param work A pointer to the work item object.
*
* @return RT_EOK Success.
* @return -RT_EBUSY This work item is executing.