1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 08:06:17 +04:00

Guard fpe by arch

This commit is contained in:
Jiajie Chen 2020-06-12 09:11:19 +08:00
parent 5b01f1b6ad
commit dfa963ad04

View File

@ -8,8 +8,10 @@ use rcore_thread::std_thread::current;
pub static mut TICK: usize = 0;
#[cfg(target_arch = "x86_64")]
global_asm!(include_str!("fpe.S"));
#[cfg(target_arch = "x86_64")]
extern "C" {
fn fpe();
}
@ -26,6 +28,7 @@ pub fn timer() {
if cpu::id() == 0 {
unsafe {
TICK += 1;
#[cfg(target_arch = "x86_64")]
fpe();
if uptime_msec() % INFORM_PER_MSEC == 0 {
TICK_ACTIVITY.notify_all();