[][src]Crate kernel

Core Tock Kernel

The kernel crate implements the core features of Tock as well as shared code that many chips, capsules, and boards use. It also holds the Hardware Interface Layer (HIL) definitions.

Most unsafe code is in this kernel crate.

Modules

capabilities

Special restricted capabilities.

common

Common operations and types in Tock.

component

Components extend the functionality of the Tock kernel through a simple factory method interface.

debug

Support for in-kernel debugging.

hil

Public traits for interfaces between Tock components.

introspection

Mechanism for inspecting the status of the kernel.

ipc

Inter-process communication mechanism for Tock.

mpu

Interface for configuring the Memory Protection Unit.

procs

Publicly available process-related objects.

syscall

Tock syscall number definitions and arch-agnostic interface trait.

Macros

count_expressions

Count the number of passed expressions. Useful for constructing variable sized arrays in other macros. Taken from the Little Book of Rust Macros

create_capability

Create an object with the given capability.

debug

In-kernel println() debugging.

debug_enqueue

This macro prints a new line to an internal ring buffer, the contents of which are only flushed with debug_flush_queue! and in the panic handler.

debug_flush_queue

This macro flushes the contents of the debug queue into the regular debug output.

debug_gpio

In-kernel gpio debugging, accepts any GPIO HIL method

debug_verbose

In-kernel println() debugging with filename and line numbers.

static_buf

Allocates a statically-sized global array of memory for data structures but does not initialize the memory.

static_init

Allocates a statically-sized global array of memory and initializes the memory for a particular data structure.

static_init_half

This macro is deprecated. You should migrate to using static_buf! followed by a call to StaticUninitializedBuffer::initialize().

storage_volume

Allocates space in the kernel image for on-chip non-volatile storage.

Structs

AppId

Userspace app identifier.

AppSlice

Buffer of memory shared from an app to the kernel.

Callback

Type for calling a callback in a process.

Grant

Region of process memory reserved for the kernel.

Kernel

Main object for the kernel. Each board will need to create one.

NoClockControl

Helper struct for interfaces that expect clocks, but have no clock control.

Private

Type for specifying an AppSlice is hidden from the kernel.

Shared

Type for specifying an AppSlice is shared with the kernel.

Enums

ReturnCode

Standard return errors in Tock.

Statics

NO_CLOCK_CONTROL

Instance of NoClockControl for things that need references to ClockInterface objects.

Traits

Chip

Interface for individual MCUs.

ClockInterface

Generic operations that clock-like things are expected to support.

Driver

Drivers implement the three driver-specific system calls: subscribe, command and allow.

Platform

Interface for individual boards.

SysTick

Interface for the system tick timer.