Module kernel::processbuffer[][src]

Expand description

Data structures for passing application memory to the kernel.

A Tock process can pass read-write or read-only buffers into the kernel for it to use. The kernel checks that read-write buffers exist within a process’s RAM address space, and that read-only buffers exist either within its RAM or flash address space. These buffers are shared with the allow_read_write() and allow_read_only() system calls.

A read-write and read-only call is mapped to the high-level Rust types ReadWriteProcessBuffer and ReadOnlyProcessBuffer respectively. The memory regions can be accessed through the ReadableProcessBuffer and WriteableProcessBuffer traits, implemented on the process buffer structs.

Each access to the buffer structs requires a liveness check to ensure that the process memory is still valid. For a more traditional interface, users can convert buffers into ReadableProcessSlice or WriteableProcessSlice and use these for the lifetime of their operations. Users cannot hold live-lived references to these slices, however.

Structs

Read-only buffer shared by a userspace process

Read-writable buffer shared by a userspace process

Read-only wrapper around a Cell

Readable and accessible slice of memory of a process buffer

Read-writeable and accessible slice of memory of a process buffer

Traits

A readable region of userspace process memory.

A readable and writeable region of userspace process memory.

Type Definitions

A shareable region of userspace memory.