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
respectively. The memory regions can be accessed through the
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
WriteableProcessSlice and use these for the lifetime of their
operations. Users cannot hold live-lived references to these slices,
- Read-only buffer shared by a userspace process
- Provides access to a ReadOnlyProcessBuffer with a restricted lifetime. This automatically dereferences into a ReadOnlyProcessBuffer
- Read-writable buffer shared by a userspace process
- Provides access to a ReadWriteProcessBuffer with a restricted lifetime. This automatically dereferences into a ReadWriteProcessBuffer
- Read-only wrapper around a
- Readable and accessible slice of memory of a process buffer
- Read-writeable and accessible slice of memory of a process buffer
- A readable region of userspace process memory.
- A readable and writeable region of userspace process memory.
- A shareable region of userspace memory.