kernel

Module processbuffer

Source
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§

Traits§

Type Aliases§