Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
3e975788
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3e975788
编写于
12月 14, 2021
作者:
O
ousugo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix format and mistake
上级
4820dbb0
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
17 addition
and
9 deletion
+17
-9
components/drivers/src/pipe.c
components/drivers/src/pipe.c
+17
-9
未找到文件。
components/drivers/src/pipe.c
浏览文件 @
3e975788
...
...
@@ -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
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录