diff --git a/src/scheduler/task.rs b/src/scheduler/task.rs index 681b435313..081116562c 100644 --- a/src/scheduler/task.rs +++ b/src/scheduler/task.rs @@ -373,6 +373,7 @@ pub(crate) struct Task { /// Last stack pointer on the user stack before jumping to kernel space pub user_stack_pointer: VirtAddr, /// Last FPU state before a context switch to another task using the FPU + #[cfg(any(target_arch = "x86_64", target_arch = "riscv64"))] pub last_fpu_state: arch::processor::FPUState, /// ID of the core this task is running on pub core_id: CoreId, @@ -410,6 +411,7 @@ impl Task { prio: task_prio, last_stack_pointer: VirtAddr(0u64), user_stack_pointer: VirtAddr(0u64), + #[cfg(any(target_arch = "x86_64", target_arch = "riscv64"))] last_fpu_state: arch::processor::FPUState::new(), core_id, stacks, @@ -431,6 +433,7 @@ impl Task { prio: IDLE_PRIO, last_stack_pointer: VirtAddr(0u64), user_stack_pointer: VirtAddr(0u64), + #[cfg(any(target_arch = "x86_64", target_arch = "riscv64"))] last_fpu_state: arch::processor::FPUState::new(), core_id, stacks: TaskStacks::from_boot_stacks(),