Struct cortex_m_rtfm::Resource [] [src]

pub struct Resource<T, C> { /* fields omitted */ }

A resource with ceiling C

A resource is used to share memory between two or more tasks

Methods

impl<T, RC> Resource<T, RC> where
    RC: GreaterThanOrEqual<U0>,
    RC: LessThanOrEqual<UMax>, 
[src]

Creates a new resource

impl<T, RC> Resource<T, RC>
[src]

Grants data race free and deadlock free access to the resource data

This operation is zero cost and doesn't impose any additional blocking.

Requirements

To access the resource data these conditions must be met:

  • The resource ceiling must be greater than or equal to the task priority
  • The preemption threshold must be greater than or equal to the resource ceiling

Trait Implementations

impl<T, C> Sync for Resource<T, C> where
    T: Send
[src]

impl<T, RC> ResourceLike for Resource<T, RC>
[src]

The ceiling of the resource