From 16823f4fe578338bc133988b377d01d29486901e Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Wed, 21 Oct 2020 21:50:55 +0200 Subject: Upgrade parking_lot to version 0.11.0 Test: TH Bug: 169931010 Change-Id: Ifb72995923062789a107a508a550a0fe7b128171 --- src/raw_fair_mutex.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/raw_fair_mutex.rs') diff --git a/src/raw_fair_mutex.rs b/src/raw_fair_mutex.rs index 3eb7ddb..0da6828 100644 --- a/src/raw_fair_mutex.rs +++ b/src/raw_fair_mutex.rs @@ -27,19 +27,24 @@ unsafe impl lock_api::RawMutex for RawFairMutex { } #[inline] - fn unlock(&self) { + unsafe fn unlock(&self) { self.unlock_fair() } + + #[inline] + fn is_locked(&self) -> bool { + self.0.is_locked() + } } unsafe impl lock_api::RawMutexFair for RawFairMutex { #[inline] - fn unlock_fair(&self) { + unsafe fn unlock_fair(&self) { self.0.unlock_fair() } #[inline] - fn bump(&self) { + unsafe fn bump(&self) { self.0.bump() } } -- cgit v1.2.3