cargo fmt
This commit is contained in:
parent
babcd45c9c
commit
4e2436f757
11 changed files with 47 additions and 38 deletions
|
@ -30,7 +30,8 @@ impl Processor {
|
|||
}
|
||||
|
||||
lazy_static! {
|
||||
pub static ref PROCESSOR: UPIntrFreeCell<Processor> = unsafe { UPIntrFreeCell::new(Processor::new()) };
|
||||
pub static ref PROCESSOR: UPIntrFreeCell<Processor> =
|
||||
unsafe { UPIntrFreeCell::new(Processor::new()) };
|
||||
}
|
||||
|
||||
pub fn run_tasks() {
|
||||
|
@ -94,9 +95,8 @@ pub fn current_kstack_top() -> usize {
|
|||
}
|
||||
|
||||
pub fn schedule(switched_task_cx_ptr: *mut TaskContext) {
|
||||
let idle_task_cx_ptr = PROCESSOR.exclusive_session(|processor| {
|
||||
processor.get_idle_task_cx_ptr()
|
||||
});
|
||||
let idle_task_cx_ptr =
|
||||
PROCESSOR.exclusive_session(|processor| processor.get_idle_task_cx_ptr());
|
||||
unsafe {
|
||||
__switch(switched_task_cx_ptr, idle_task_cx_ptr);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue