Module kernel::process[][src]

Expand description

Types for Tock-compatible processes.

Structs

FunctionCall

Struct that defines a upcall that can be passed to a process. The upcall takes four arguments that are Driver and upcall specific, so they are represented generically here.

PanicFaultPolicy

Simply panic the entire board if a process faults.

ProcessCustomGrantIdentifer

Opaque identifier for custom grants allocated dynamically from a process’s grant region.

ProcessId

Userspace process identifier.

ProcessStandard

A type for userspace processes in Tock.

RestartFaultPolicy

Always restart the process if it faults.

StopFaultPolicy

Simply stop the process and no longer schedule it if a process faults.

StopWithDebugFaultPolicy

Stop the process and no longer schedule it if a process faults, but also print a debug message notifying the user that the process faulted and stopped.

ThresholdRestartFaultPolicy

Implementation of ProcessFaultPolicy that uses a threshold to decide whether to restart a process when it faults. If the process has been restarted more times than the threshold then the process will be stopped and no longer scheduled.

ThresholdRestartThenPanicFaultPolicy

Implementation of ProcessFaultPolicy that uses a threshold to decide whether to restart a process when it faults. If the process has been restarted more times than the threshold then the board will panic.

Enums

Error
FaultAction

The action the kernel should take when a process encounters a fault.

FunctionCallSource

Enumeration to identify whether a function call for a process comes directly from the kernel or from a upcall subscribed through a Driver implementation.

ProcessLoadError

Errors that can occur when trying to load and create processes.

State

Various states a process can be in.

Task

Tasks that can be enqueued for a process.

Traits

Process

This trait represents a generic process that the Tock scheduler can schedule.

ProcessFaultPolicy

Generic trait for implementing a policy on what to do when a process faults.

Functions

load_processes

This is a wrapper function for load_processes_advanced that uses the default arguments that mainstream boards should provide.

load_processes_advanced

Helper function to load processes from flash into an array of active processes. This is the default template for loading processes, but a board is able to create its own load_processes() function and use that instead.