Commit 9a3fea3f authored by Stefan Lankes's avatar Stefan Lankes Committed by Stefan Lankes
Browse files

minor changes to pass the format check

parent 481f709b
...@@ -18,10 +18,10 @@ pub use self::doublylinkedlist::*; ...@@ -18,10 +18,10 @@ pub use self::doublylinkedlist::*;
#[inline] #[inline]
pub fn irqsave<F, R>(mut f: F) -> R pub fn irqsave<F, R>(mut f: F) -> R
where where
F: FnOnce() -> R F: FnOnce() -> R,
{ {
let irq = irq::nested_disable(); let irq = irq::nested_disable();
let ret = f(); let ret = f();
irq::nested_enable(irq); irq::nested_enable(irq);
ret ret
} }
\ No newline at end of file
...@@ -210,12 +210,12 @@ impl PerCoreScheduler { ...@@ -210,12 +210,12 @@ impl PerCoreScheduler {
#[inline] #[inline]
pub fn handle_waiting_tasks(&mut self) { pub fn handle_waiting_tasks(&mut self) {
irqsave(|| { self.blocked_tasks.handle_waiting_tasks() }); irqsave(|| self.blocked_tasks.handle_waiting_tasks());
} }
pub fn custom_wakeup(&mut self, task: TaskHandle) { pub fn custom_wakeup(&mut self, task: TaskHandle) {
if task.get_core_id() == self.core_id { if task.get_core_id() == self.core_id {
irqsave(|| { self.blocked_tasks.custom_wakeup(task) }); irqsave(|| self.blocked_tasks.custom_wakeup(task));
} else { } else {
get_scheduler(task.get_core_id()) get_scheduler(task.get_core_id())
.input .input
...@@ -229,7 +229,10 @@ impl PerCoreScheduler { ...@@ -229,7 +229,10 @@ impl PerCoreScheduler {
#[inline] #[inline]
pub fn block_current_task(&mut self, wakeup_time: Option<u64>) { pub fn block_current_task(&mut self, wakeup_time: Option<u64>) {
irqsave(|| { self.blocked_tasks.add(self.current_task.clone(), wakeup_time) }); irqsave(|| {
self.blocked_tasks
.add(self.current_task.clone(), wakeup_time)
});
} }
#[inline] #[inline]
...@@ -248,13 +251,13 @@ impl PerCoreScheduler { ...@@ -248,13 +251,13 @@ impl PerCoreScheduler {
#[cfg(feature = "newlib")] #[cfg(feature = "newlib")]
#[inline] #[inline]
pub fn set_lwip_errno(&self, errno: i32) { pub fn set_lwip_errno(&self, errno: i32) {
irqsave(|| { self.current_task.borrow_mut().lwip_errno = errno }); irqsave(|| self.current_task.borrow_mut().lwip_errno = errno);
} }
#[cfg(feature = "newlib")] #[cfg(feature = "newlib")]
#[inline] #[inline]
pub fn get_lwip_errno(&self) -> i32 { pub fn get_lwip_errno(&self) -> i32 {
irqsave(|| { self.current_task.borrow().lwip_errno }); irqsave(|| self.current_task.borrow().lwip_errno);
} }
#[inline] #[inline]
...@@ -274,7 +277,7 @@ impl PerCoreScheduler { ...@@ -274,7 +277,7 @@ impl PerCoreScheduler {
#[inline] #[inline]
pub fn set_current_task_wakeup_reason(&mut self, reason: WakeupReason) { pub fn set_current_task_wakeup_reason(&mut self, reason: WakeupReason) {
irqsave(|| { self.current_task.borrow_mut().last_wakeup_reason = reason }); irqsave(|| self.current_task.borrow_mut().last_wakeup_reason = reason);
} }
#[inline] #[inline]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment