49# define PIPE_BUF (128)
void free(void *ptr)
This is a no-op.
pipe_t * pipe_malloc(unsigned size)
Dynamically allocate a pipe with room for size bytes.
ssize_t pipe_read(pipe_t *pipe, void *buf, size_t n)
Read from a pipe.
void pipe_free(pipe_t *rp)
Free a pipe.
struct riot_pipe pipe_t
A generic pipe.
ssize_t pipe_write(pipe_t *pipe, const void *buf, size_t n)
Write to a pipe.
void pipe_init(pipe_t *pipe, ringbuffer_t *rb, void(*free)(void *))
Initialize a pipe.
Mutex for thread synchronization.
A utility for storing and retrieving byte data using a ring buffer.
thread_t holds thread's context data.
thread_t * read_blocked
A thread that wants to write to this full pipe.
ringbuffer_t * rb
Wrapped ringbuffer.
void(* free)(void *)
Function to call by pipe_free().
thread_t * write_blocked
A thread that wants to read from this empty pipe.