MOS Source Code
Loading...
Searching...
No Matches
pipe.h File Reference
+ Include dependency graph for pipe.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pipe_t
 
struct  pipeio_t
 

Functions

pipe_tpipe_create (size_t bufsize)
 
size_t pipe_read (pipe_t *pipe, void *buf, size_t size)
 
size_t pipe_write (pipe_t *pipe, const void *buf, size_t size)
 
__nodiscard bool pipe_close_one_end (pipe_t *pipe)
 Close one end of the pipe, so that the other end will get EOF.
 
pipeio_tpipeio_create (pipe_t *pipe)
 

Function Documentation

◆ pipe_create()

pipe_t * pipe_create ( size_t bufsize)

Definition at line 174 of file pipe.c.

Referenced by ipc_server_accept(), and MOS_STATIC_ASSERT().

+ Here is the call graph for this function:

◆ pipe_read()

size_t pipe_read ( pipe_t * pipe,
void * buf,
size_t size )

Definition at line 89 of file pipe.c.

Referenced by ipc_client_read(), ipc_server_read(), and pipeio_io_read().

+ Here is the call graph for this function:

◆ pipe_write()

size_t pipe_write ( pipe_t * pipe,
const void * buf,
size_t size )

Definition at line 29 of file pipe.c.

Referenced by ipc_client_write(), ipc_server_write(), and pipeio_io_write().

+ Here is the call graph for this function:

◆ pipe_close_one_end()

__nodiscard bool pipe_close_one_end ( pipe_t * pipe)

Close one end of the pipe, so that the other end will get EOF.

Note
The other end should also call this function to get the pipe correctly freed.
Parameters
pipeThe pipe to close one end of.
Returns
true if the pipe was fully closed, false if the other end is still open.

Definition at line 143 of file pipe.c.

Referenced by ipc_client_close_channel(), ipc_server_close_channel(), and pipeio_io_close().

+ Here is the call graph for this function:

◆ pipeio_create()

pipeio_t * pipeio_create ( pipe_t * pipe)

Definition at line 228 of file pipe.c.

Referenced by MOS_STATIC_ASSERT().

+ Here is the call graph for this function: