fs: Add file_pipe function

so pty don't need call nx_pipe and then file_detach

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ibb8d108abd76bafe53897e5fca35babcf3e1bae9
This commit is contained in:
Xiang Xiao
2021-01-03 13:51:38 +08:00
parent 085543a156
commit 028c6aa6e6
3 changed files with 126 additions and 130 deletions
+1
View File
@@ -1499,6 +1499,7 @@ int nx_unlink(FAR const char *pathname);
****************************************************************************/
#if defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0
int file_pipe(FAR struct file *filep[2], size_t bufsize, int flags);
int nx_pipe(int fd[2], size_t bufsize, int flags);
#endif