diff --git a/src/riot-rs-threads/src/lib.rs b/src/riot-rs-threads/src/lib.rs index 133527b72..d5cc58e4a 100644 --- a/src/riot-rs-threads/src/lib.rs +++ b/src/riot-rs-threads/src/lib.rs @@ -185,7 +185,7 @@ impl Threads { self.runqueue.add(pid, prio); self.schedule_if_higher_prio(pid, prio); } else if old_state == ThreadState::Running { - // A running thread is only set into a non-running state + // A running thread is only set to a non-running state // if it itself initiated it. debug_assert_eq!(Some(pid), self.current_pid()); @@ -223,7 +223,7 @@ impl Threads { } thread.prio = prio; if thread.state != ThreadState::Running { - // No runqueue changes or scheduler invocations needed. + // No runqueue changes or scheduler invocation needed. return; } @@ -234,7 +234,7 @@ impl Threads { } self.runqueue.add(thread_id, prio); - // Check if the thread currently running and trigger the scheduler if + // Check if the thread is currently running and trigger the scheduler if // its prio decreased and another thread might have a higher prio now. if self.is_running(thread_id) { if prio < old_prio { @@ -250,7 +250,7 @@ impl Threads { } } - /// Trigger the scheduler if the thread has higher priority than the current running thread. + /// Triggers the scheduler if the thread has higher priority than the current running thread. fn schedule_if_higher_prio(&mut self, _thread_id: ThreadId, prio: RunqueueId) { match self.current().map(|t| t.prio) { Some(curr_prio) if curr_prio < prio => schedule(),