spelling, naming

master
Robert Jördens 2021-06-24 10:21:32 +02:00
parent a3dd760aba
commit 2c5afe959b
1 changed files with 4 additions and 4 deletions

View File

@ -234,13 +234,13 @@ pub fn setup(
let channels = rtt_target::rtt_init_default!(); let channels = rtt_target::rtt_init_default!();
// Note(unsafe): The closure we pass does not establish a critical section // 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 { unsafe {
rtt_target::set_print_channel_cs( rtt_target::set_print_channel_cs(
channels.up.0, channels.up.0,
&((|arg, f| { &((|arg, f| {
static LOGGER_LOCK: AtomicBool = AtomicBool::new(false); static LOCKED: AtomicBool = AtomicBool::new(false);
if LOGGER_LOCK.compare_exchange_weak( if LOCKED.compare_exchange_weak(
false, false,
true, true,
Ordering::Acquire, Ordering::Acquire,
@ -248,7 +248,7 @@ pub fn setup(
) == Ok(false) ) == Ok(false)
{ {
f(arg); f(arg);
LOGGER_LOCK.store(false, Ordering::Release); LOCKED.store(false, Ordering::Release);
} }
}) as rtt_target::CriticalSectionFunc), }) as rtt_target::CriticalSectionFunc),
); );