Skip to content

Commit c47d88b

Browse files
committed
formatted
1 parent 2d5c35b commit c47d88b

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

api/arceos_api/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,12 @@ pub mod modules {
402402
pub use axdriver;
403403
#[cfg(feature = "fs")]
404404
pub use axfs;
405+
#[cfg(feature = "ipi")]
406+
pub use axipi;
405407
#[cfg(feature = "paging")]
406408
pub use axmm;
407409
#[cfg(feature = "net")]
408410
pub use axnet;
409411
#[cfg(feature = "multitask")]
410412
pub use axtask;
411-
#[cfg(feature = "ipi")]
412-
pub use axipi;
413413
}

modules/axipi/src/event.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ impl MulticastCallback {
3333

3434
/// Convert the [`MulticastCallback`] into a [`Callback`].
3535
pub fn into_unicast(self) -> Callback {
36-
Callback(Box::new(move || {
37-
(self.0)()
38-
}))
36+
Callback(Box::new(move || (self.0)()))
3937
}
4038
}
4139

@@ -49,4 +47,4 @@ impl<T: Fn() + 'static> From<T> for MulticastCallback {
4947
pub struct IPIEvent {
5048
pub src_cpu_id: usize,
5149
pub callback: Callback,
52-
}
50+
}

modules/axipi/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ use axhal::irq::IPI_IRQ_NUM;
1616
mod event;
1717
mod queue;
1818

19-
use queue::IPIEventQueue;
2019
pub use event::*;
20+
use queue::IPIEventQueue;
2121

2222
#[percpu::def_percpu]
2323
static IPI_EVENT_QUEUE: LazyInit<SpinNoIrq<IPIEventQueue>> = LazyInit::new();

modules/axipi/src/queue.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ impl IPIEventQueue {
2727

2828
/// Push a new event into the queue.
2929
pub fn push(&mut self, src_cpu_id: usize, callback: Callback) {
30-
self.events.push_back(IPIEvent { src_cpu_id, callback });
30+
self.events.push_back(IPIEvent {
31+
src_cpu_id,
32+
callback,
33+
});
3134
}
3235

3336
/// Try to pop the latest event that exists in the queue.

0 commit comments

Comments
 (0)