mirror of
https://github.com/rcore-os/rCore.git
synced 2024-11-27 02:03:29 +04:00
14 lines
269 B
Rust
14 lines
269 B
Rust
|
use process::PROCESSOR;
|
||
|
|
||
|
|
||
|
pub fn timer() {
|
||
|
let mut processor = PROCESSOR.try().unwrap().lock();
|
||
|
processor.tick();
|
||
|
}
|
||
|
|
||
|
pub fn before_return() {
|
||
|
use process::PROCESSOR;
|
||
|
if let Some(processor) = PROCESSOR.try() {
|
||
|
processor.lock().schedule();
|
||
|
}
|
||
|
}
|