summaryrefslogtreecommitdiff
path: root/components/drivers/src/pipe.c
diff options
context:
space:
mode:
authorMeco Jianting Man <[email protected]>2021-03-17 02:32:02 +0800
committerGitHub <[email protected]>2021-03-17 02:32:02 +0800
commit295b95cd7529bc9b85b4fb8ee8b37c62811ffbc8 (patch)
treeb834c7a930dd12735759a6358ccef2bb94cfcc6f /components/drivers/src/pipe.c
parentc3ffe18688a3696a486855ae98002714546bd836 (diff)
parentb12615f344e7e0824ab262994f443c452be04973 (diff)
Merge pull request #28 from RT-Thread/master
pr
Diffstat (limited to 'components/drivers/src/pipe.c')
-rw-r--r--components/drivers/src/pipe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/drivers/src/pipe.c b/components/drivers/src/pipe.c
index bd392cba2b..10b880ff7a 100644
--- a/components/drivers/src/pipe.c
+++ b/components/drivers/src/pipe.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -330,7 +330,7 @@ rt_err_t rt_pipe_open (rt_device_t device, rt_uint16_t oflag)
ret = -RT_EINVAL;
goto __exit;
}
-
+
rt_mutex_take(&(pipe->lock), RT_WAITING_FOREVER);
if (pipe->fifo == RT_NULL)
@@ -428,7 +428,7 @@ rt_err_t rt_pipe_control(rt_device_t dev, int cmd, void *args)
}
#ifdef RT_USING_DEVICE_OPS
-const static struct rt_device_ops pipe_ops =
+const static struct rt_device_ops pipe_ops =
{
RT_NULL,
rt_pipe_open,
@@ -507,7 +507,7 @@ int rt_pipe_delete(const char *name)
rt_device_unregister(device);
/* close fifo ringbuffer */
- if (pipe->fifo)
+ if (pipe->fifo)
{
rt_ringbuffer_destroy(pipe->fifo);
pipe->fifo = RT_NULL;
@@ -564,7 +564,7 @@ int pipe(int fildes[2])
int mkfifo(const char *path, mode_t mode)
{
rt_pipe_t *pipe;
-
+
pipe = rt_pipe_create(path, PIPE_BUFSZ);
if (pipe == RT_NULL)
{