|
AquilaOS documentation
How it works, and its code
|
Go to the source code of this file.
Data Structures | |
| struct | pipe |
| A pipe, or a FIFO's pipe. More... | |
Macros | |
| #define | PIPE_BUFLEN 1024 |
Functions | |
| int | pipefs_pipe (struct file *read, struct file *write) |
| Makes an anonymous pipe, for pipe(): one open file for each end. | |
| int | pipefs_fifo_open (struct file *file) |
| Opens a FIFO: the open file's vnode becomes an end of the FIFO's pipe, made by its first open. | |
Variables | |
| struct fs | pipefs |
| #define PIPE_BUFLEN 1024 |
Definition at line 14 of file pipe.h.
Referenced by pipefs_mkpipe().
| int pipefs_fifo_open | ( | struct file * | file | ) |
Opens a FIFO: the open file's vnode becomes an end of the FIFO's pipe, made by its first open.
Opening for reading waits for a writer, and opening for writing for a reader, unless the file is non-blocking (then a writer without readers fails with ENXIO) or opened read-write (which is both).
| file | the open file, whose vnode is the FIFO; it's left as it was on failure |
Definition at line 239 of file pipe.c.
References END_RDWR, END_READ, END_WRITE, pipe::fifo, vnode::fifo, file::flags, has_readers(), has_writers(), NULL, pipefs_end(), pipefs_fifo_open(), pipefs_mkpipe(), pipefs_pfree(), pipe::queue, pipe::r_opens, vnode::ref, vfs_close(), pipe::w_opens, waitq_sleep(), and waitq_wakeup().
Referenced by pipefs_fifo_open(), and vfs_file_open().
Makes an anonymous pipe, for pipe(): one open file for each end.
| read | the open file for the reading end, its vnode set here |
| write | the open file for the writing end, its vnode and flags set here |
Definition at line 199 of file pipe.c.
References END_READ, END_WRITE, file::flags, kfree(), NULL, pipefs_end(), pipefs_mkpipe(), pipefs_pfree(), and pipefs_pipe().
Referenced by pipefs_pipe(), and sys_pipe().
|
extern |
Definition at line 308 of file pipe.c.
Referenced by pipefs_end().