summaryrefslogtreecommitdiff
path: root/components/drivers/src
diff options
context:
space:
mode:
authorousugo <[email protected]>2021-12-14 14:13:02 +0800
committerousugo <[email protected]>2021-12-14 14:13:02 +0800
commit3e9757888f94fb739c77e6dbaa941500234cc3d9 (patch)
tree6ae377cd259881eaf50e06311d4a3a3d95b8b32b /components/drivers/src
parent4820dbb0b3a15a62f4cd5f3e20fb4e02e4bfbb20 (diff)
Fix format and mistake
Diffstat (limited to 'components/drivers/src')
-rw-r--r--components/drivers/src/pipe.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/components/drivers/src/pipe.c b/components/drivers/src/pipe.c
index 993f6f7616..7e1f569b62 100644
--- a/components/drivers/src/pipe.c
+++ b/components/drivers/src/pipe.c
@@ -24,7 +24,8 @@
*
* @param fd is the file descriptor.
*
- * @return Return the operation status, 0 on successful.
+ * @return Return the operation status.
+ * When the return value is 0, it means the operation is successful.
* When the return value is -1, it means the file descriptor is invalid.
* When the return value is -RT_ENOMEM, it means insufficient memory allocation failed.
*/
@@ -76,7 +77,8 @@ __exit:
*
* @param fd is the file descriptor.
*
- * @return Return the operation status, 0 on successful.
+ * @return Return the operation status.
+ * When the return value is 0, it means the operation is successful.
* When the return value is -1, it means the file descriptor is invalid.
*/
static int pipe_fops_close(struct dfs_fd *fd)
@@ -146,7 +148,8 @@ static int pipe_fops_close(struct dfs_fd *fd)
*
* @param args is the pointer to the data to store the read data.
*
- * @return Return the operation status, 0 on successful.
+ * @return Return the operation status.
+ * When the return value is 0, it means the operation is successful.
* When the return value is -EINVAL, it means the command is invalid.
*/
static int pipe_fops_ioctl(struct dfs_fd *fd, int cmd, void *args)
@@ -326,9 +329,9 @@ out:
*
* @return mask of the pipe status.
* POLLIN means there is data to be read.
- * POLLHUP means there is no thread that has the pipe open for writing.
+ * POLLHUP means there is no thread that occupied the pipe to open for writing.
* POLLOUT means there is space to be written.
- * POLLERR means there is no thread that has the pipe open for reading.
+ * POLLERR means there is no thread that occupied the pipe to open for reading.
*/
static int pipe_fops_poll(struct dfs_fd *fd, rt_pollreq_t *req)
{
@@ -554,7 +557,7 @@ static rt_size_t rt_pipe_write(rt_device_t device, rt_off_t pos, const void *buf
*
* @param args is not used yet.
*
- * @return Always return RT_EOK yet.
+ * @return Always return RT_EOK.
*/
static rt_err_t rt_pipe_control(rt_device_t dev, int cmd, void *args)
{
@@ -636,7 +639,8 @@ rt_pipe_t *rt_pipe_create(const char *name, int bufsz)
*
* @param pipe is the pointer to the pipe device.
*
- * @return Return the operation status, 0 on successful.
+ * @return Return the operation status.
+ * When the return value is 0, it means the operation is successful.
* When the return value is -RT_EINVAL, it means the pipe device is not found or the device isn't a pipe.
* When the return value is -RT_EBUSY, it means the pipe device is busy.
*/
@@ -690,7 +694,9 @@ int rt_pipe_delete(const char *name)
* @param fildes[0] is the read handle.
* fildes[1] is the write handle.
*
- * @return Return the operation status, 0 on successful, -1 on failed.
+ * @return Return the operation status.
+ * When the return value is 0, it means the operation is successful.
+ * When the return value is -1, it means the operation is failed.
*/
int pipe(int fildes[2])
{
@@ -732,7 +738,9 @@ int pipe(int fildes[2])
*
* @param mode is not used yet.
*
- * @return Return the operation status, 0 on successful, -1 on failed.
+ * @return Return the operation status.
+ * When the return value is 0, it means the operation is successful.
+ * When the return value is -1, it means the operation is failed.
*/
int mkfifo(const char *path, mode_t mode)
{