revise some RT_USING_POSIX to RT_USING_POSIX_DEVIO

This commit is contained in:
Meco Man
2021-11-24 09:47:55 -05:00
parent bd80b7a4a1
commit 7c789d4b11
14 changed files with 34 additions and 52 deletions
+5 -5
View File
@@ -13,7 +13,7 @@
#include <stdint.h>
#include <sys/errno.h>
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX_DEVIO
#include <dfs_file.h>
#include <dfs_posix.h>
#include <poll.h>
@@ -320,7 +320,7 @@ static const struct dfs_file_ops pipe_fops =
RT_NULL,
pipe_fops_poll,
};
#endif /* end of RT_USING_POSIX */
#endif /* RT_USING_POSIX_DEVIO */
rt_err_t rt_pipe_open(rt_device_t device, rt_uint16_t oflag)
{
@@ -479,7 +479,7 @@ rt_pipe_t *rt_pipe_create(const char *name, int bufsz)
rt_free(pipe);
return RT_NULL;
}
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX_DEVIO
dev->fops = (void*)&pipe_fops;
#endif
@@ -529,7 +529,7 @@ int rt_pipe_delete(const char *name)
return result;
}
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX_DEVIO
int pipe(int fildes[2])
{
rt_pipe_t *pipe;
@@ -575,4 +575,4 @@ int mkfifo(const char *path, mode_t mode)
return 0;
}
#endif
#endif /* RT_USING_POSIX_DEVIO */