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 Process Buffer - Read-only buffer shared by a userspace process.
- Read
Only Process Buffer Ref - Provides access to a
ReadOnlyProcessBuffer
with a restricted lifetime. This automatically dereferences into a ReadOnlyProcessBuffer - Read
Write Process Buffer - Read-writable buffer shared by a userspace process.
- Read
Write Process Buffer Ref - Provides access to a
ReadWriteProcessBuffer
with a restricted lifetime. This automatically dereferences into a ReadWriteProcessBuffer - Readable
Process Byte - Read-only wrapper around a
Cell
- Readable
Process Slice - Readable and accessible slice of memory of a process buffer.
- Writeable
Process Slice - Read-writeable and accessible slice of memory of a process buffer
Traits§
- Process
Slice Index - Equivalent of the Rust core library’s
SliceIndex
type for process slices. - Readable
Process Buffer - A readable region of userspace process memory.
- Writeable
Process Buffer - A readable and writeable region of userspace process memory.
Type Aliases§
- Userspace
Readable Process Buffer - A shareable region of userspace memory.