You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I looked at the code of ruxos task ,I found in modules/ruxhal/src/cpu.rs,ruxos seems use sp_el0 to save current cpu ptr in aarch64. I think it is not reasonable.Why? I guess it may be a mistake.
/// Sets the pointer to the current task with preemption-safety.////// Preemption may be enabled when calling this function. This function will/// guarantee the correctness even the current task is preempted.////// # Safety////// The given `ptr` must be pointed to a valid task structure.#[inline]pubunsafefnset_current_task_ptr<T>(ptr:*constT){#[cfg(target_arch = "x86_64")]{CURRENT_TASK_PTR.write_current_raw(ptr asusize)}#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]{let _guard = kernel_guard::IrqSave::new();CURRENT_TASK_PTR.write_current_raw(ptr asusize)}#[cfg(target_arch = "aarch64")]{use tock_registers::interfaces::Writeable;
aarch64_cpu::registers::SP_EL0.set(ptr asu64)}}
```
The text was updated successfully, but these errors were encountered:
When I looked at the code of ruxos task ,I found in
modules/ruxhal/src/cpu.rs
,ruxos seems use sp_el0 to save current cpu ptr in aarch64. I think it is not reasonable.Why? I guess it may be a mistake.The text was updated successfully, but these errors were encountered: