From 4e6818eb2cd396dde39f05bd85628326b0492fe9 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 19 Apr 2017 17:21:13 -0500 Subject: remove claim, add Priority.as_ceiling --- src/lib.rs | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index eec40e4..06efd51 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,7 @@ use cortex_m::interrupt::Nr; #[cfg(not(thumbv6m))] use cortex_m::register::{basepri, basepri_max}; use static_ref::Ref; -use typenum::{Cmp, Equal, Unsigned}; +use typenum::{Cmp, Unsigned}; #[cfg(not(thumbv6m))] use typenum::{Greater, Less}; @@ -74,19 +74,6 @@ impl Resource> { unsafe { Ref::new(&*self.data.get()) } } - /// Claims the resource at the task with highest priority - /// - /// This operation is zero cost and doesn't impose any additional blocking - pub fn claim<'task, PRIORITY>( - &'static self, - _priority: &'task P, - ) -> Ref<'task, T> - where - CEILING: Cmp, - { - unsafe { Ref::new(&*self.data.get()) } - } - /// Locks the resource for the duration of the critical section `f` /// /// For the duration of the critical section, tasks whose priority level is @@ -161,17 +148,6 @@ impl Peripheral> { unsafe { Ref::new(&*self.peripheral.get()) } } - /// See [Resource.claim](./struct.Resource.html#method.claim) - pub fn claim<'task, PRIORITY>( - &'static self, - _priority: &'task P, - ) -> Ref<'task, Periph> - where - CEILING: Cmp, - { - unsafe { Ref::new(&*self.peripheral.get()) } - } - /// See [Resource.lock](./struct.Resource.html#method.lock) #[cfg(not(thumbv6m))] pub fn lock(&'static self, _priority: &P, f: F) -> R -- cgit v1.2.3