Ashet OS

namespace: ashet.pipe

System Calls

syscall create(in object_size: usize, in fifo_length: usize, out handle: Pipe)

Spawns a new pipe with fifo_length elements of object_size bytes. If fifo_length is 0, the pipe is synchronous and can only send data if a read call is active. Otherwise, up to fifo_length elements can be stored in a FIFO.

syscall get_fifo_length(in handle: Pipe, out length: usize)

Returns the length of the pipe-internal FIFO in elements.

syscall get_object_size(in handle: Pipe, out size: usize)

Returns the size of the objects stored in the pipe.

Asynchronous Operations

async_call Write(in handle: Pipe, in data: bytestr, in stride: usize, in mode: PipeMode, out count: usize)

Writes elements from data into the given pipe.

async_call Read(in handle: Pipe, in buffer: bytebuf, in stride: usize, in mode: PipeMode, out count: usize)

Reads elements from a pipe into buffer.