From acdfa6f09d27fea43926e1d286f13f27a811a203 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 8 May 2017 13:27:29 -0500 Subject: drop the Ceiling newtype it's not required as the user never deal with Ceiling tokens --- src/lib.rs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 5de71fb..57f7f42 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -494,7 +494,7 @@ pub struct Resource { data: UnsafeCell, } -impl Resource> +impl Resource where RC: GreaterThanOrEqual, RC: LessThanOrEqual, @@ -508,7 +508,7 @@ where } } -impl Resource> { +impl Resource { /// Grants data race free and deadlock free access to the resource data /// /// This operation is zero cost and doesn't impose any additional blocking. @@ -552,7 +552,7 @@ where _ceiling: PhantomData, } -impl Peripheral> +impl Peripheral where PC: GreaterThanOrEqual, PC: LessThanOrEqual, @@ -567,7 +567,7 @@ where } } -impl Peripheral> { +impl Peripheral { /// See [Resource.access](./struct.Resource.html#method.access) pub fn access<'cs, TP, PT>( &'static self, @@ -684,13 +684,6 @@ where { } -/// Resource ceiling -pub struct Ceiling { - _marker: PhantomData, -} - -impl !Send for Ceiling {} - /// Preemption threshold pub struct Threshold { _marker: PhantomData, @@ -744,11 +737,11 @@ pub unsafe trait ResourceLike { type Ceiling; } -unsafe impl ResourceLike for Peripheral> { +unsafe impl ResourceLike for Peripheral { type Ceiling = PC; } -unsafe impl ResourceLike for Resource> { +unsafe impl ResourceLike for Resource { type Ceiling = RC; } -- cgit v1.2.3