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


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

Creates a new resource

impl<T, RC> Resource<T, RC>

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

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


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

impl<T, RC> ResourceLike for Resource<T, RC>

The ceiling of the resource