Struct kernel::process::ProcessStandard[][src]

pub struct ProcessStandard<'a, C: 'static + Chip> { /* fields omitted */ }
Expand description

A type for userspace processes in Tock.

Trait Implementations

Returns the process’s identifier.

Queue a Task for the process. This will be added to a per-process buffer and executed by the scheduler. Tasks are some function the app should run, for example a upcall or an IPC call. Read more

Returns whether this process is ready to execute.

Remove all scheduled upcalls for a given upcall id from the task queue. Read more

Returns the current state the process is in. Common states are “running” or “yielded”. Read more

Move this process from the running state to the yielded state. Read more

Move this process from running or yielded state into the stopped state. Read more

Move this stopped process back into its original state. Read more

Put this process in the fault state. This will trigger the FaultResponse for this process to occur. Read more

Terminates and attempts to restart the process. The process and current application always terminate. The kernel may, based on its own policy, restart the application using the same process, reuse the process for another application, or simply terminate the process and application. Read more

Stop and clear a process’s state, putting it into the Terminated state. Read more

Returns how many times this process has been restarted.

Return if there are any Tasks (upcalls/IPC requests) enqueued for the process. Read more

Remove the scheduled operation from the front of the queue and return it to be handled by the scheduler. Read more

Returns the number of pending tasks. If 0 then dequeue_task() will return None when called. Read more

The start address of allocated RAM for this process.

The first address after the end of the allocated RAM for this process.

The start address of the flash region allocated for this process.

Get the first address of process’s flash that isn’t protected by the kernel. The protected range of flash contains the TBF header and potentially other state the kernel is storing on behalf of the process, and cannot be edited by the process. Read more

The first address after the end of the flash region allocated for this process. Read more

The lowest address of the grant region for the process.

How many writeable flash regions defined in the TBF header for this process. Read more

Get the offset from the beginning of flash and the size of the defined writeable flash region. Read more

Debug function to update the kernel on where the stack starts for this process. Processes are not required to call this through the memop system call, but it aids in debugging the process. Read more

Debug function to update the kernel on where the process heap starts. Also optional. Read more

Return the highest address the process has access to, or the current process memory brk. Read more

Configure the MPU to use the process’s allocated regions. Read more

Allocate a new MPU region for the process that is at least min_region_size bytes and lies within the specified stretch of unallocated memory. Read more

Removes an MPU region from the process that has been previouly added with add_mpu_region. Read more

Change the location of the program break, reallocate the MPU region covering program memory, and return the previous break address. Read more

Change the location of the program break and reallocate the MPU region covering program memory. Read more

Creates a ReadWriteProcessBuffer from the given offset and size in process memory. Read more

Creates a ReadOnlyProcessBuffer from the given offset and size in process memory. Read more

Set a single byte within the process address space at addr to value. Return true if addr is within the RAM bounds currently exposed to the process (thereby writable by the process itself) and the value was set, false otherwise. Read more

Check if a given grant for this process has been allocated. Read more

Allocate memory from the grant region and store the reference in the proper grant pointer index. Read more

Allocate memory from the grant region that is size bytes long and aligned to align bytes. This is used for creating custom grants which are not recorded in the grant pointer array, but are useful for capsules which need additional process-specific dynamically allocated memory. Read more

Enter the grant based on grant_num for this process. Read more

Enter a custom grant based on the identifier. Read more

Opposite of enter_grant(). Used to signal that the grant is no longer entered. Read more

Return the count of the number of allocated grant pointers if the process is active. This does not count custom grants. Read more

Get the grant number (grant_num) associated with a given driver number if there is a grant associated with that driver_num. Read more

Verify that an Upcall function pointer is within process-accessible memory. Read more

Get the name of the process. Used for IPC.

Set the return value the process should see when it begins executing again after the syscall. Read more

Set the function that is to be executed when the process is resumed. Read more

Context switch to a specific process. Read more

Returns how many syscalls this app has called.

Returns how many upcalls for this process have been dropped.

Returns how many times this process has exceeded its timeslice.

Increment the number of times the process has exceeded its timeslice.

Increment the number of times the process called a syscall and record the last syscall that was called. Read more

Return the address of the start of the process heap, if known.

Return the address of the start of the process stack, if known.

Return the lowest recorded address of the process stack, if known.

Return process state information related to the location in memory of various process data structures. Read more

Return process state information related to the size in memory of various process data structures. Read more

Print out the memory map (Grant region, heap, stack, program memory, BSS, and data sections) of this process. Read more

Print out the full state of the process: its memory map, its context, and the state of the memory protection unit (MPU). Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.