From 2c5afe959b4e4d284e711430205f4618844812cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Thu, 24 Jun 2021 10:21:32 +0200 Subject: [PATCH] spelling, naming --- src/hardware/setup.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hardware/setup.rs b/src/hardware/setup.rs index 99d0fce..f647047 100644 --- a/src/hardware/setup.rs +++ b/src/hardware/setup.rs @@ -234,13 +234,13 @@ pub fn setup( let channels = rtt_target::rtt_init_default!(); // Note(unsafe): The closure we pass does not establish a critical section - // as demanded but it ensure synchronization and implements a lock. + // as demanded but it does ensure synchronization and implements a lock. unsafe { rtt_target::set_print_channel_cs( channels.up.0, &((|arg, f| { - static LOGGER_LOCK: AtomicBool = AtomicBool::new(false); - if LOGGER_LOCK.compare_exchange_weak( + static LOCKED: AtomicBool = AtomicBool::new(false); + if LOCKED.compare_exchange_weak( false, true, Ordering::Acquire, @@ -248,7 +248,7 @@ pub fn setup( ) == Ok(false) { f(arg); - LOGGER_LOCK.store(false, Ordering::Release); + LOCKED.store(false, Ordering::Release); } }) as rtt_target::CriticalSectionFunc), );