PatchworkOS
Loading...
Searching...
No Matches
Pipes

Pipes. More...

Data Structures

struct  pipe_private_t
 

Functions

void pipe_init (void)
 

Detailed Description

Pipes.

Pipes are exposed in the /dev/pipe directory. Pipes are unidirectional communication channels that can be used for inter-process communication (IPC).

Creating Pipes

Pipes are created using the /dev/pipe/new file. Opening this file using open() will return one file descriptor that can be used for both reading and writing. To create a pipe with separate file descriptors for reading and writing, use open2() with the /dev/pipe/new file.

Using Pipes

Pipes can be read from and written to using the expected read() and write() system calls. Pipes are blocking and pollable, following expected POSIX semantics.

Function Documentation

◆ pipe_init()

void pipe_init ( void  )

Definition at line 206 of file pipe.c.

References fileOps, newFile, NULL, panic(), pipeDir, sysfs_dir_new(), and sysfs_file_new().

Referenced by init_finalize().