parent
8730000045
commit
716c236f14
@ -1 +1,3 @@
|
||||
//! Constants used in rCore for K210 devel board
|
||||
|
||||
pub const CLOCK_FREQ: usize = 403000000 / 62;
|
||||
|
@ -1 +1,3 @@
|
||||
//! Constants used in rCore for K210 devel board
|
||||
|
||||
pub const CLOCK_FREQ: usize = 12500000;
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Synchronization and interior mutability primitives
|
||||
|
||||
mod up;
|
||||
|
||||
pub use up::UPSafeCell;
|
||||
|
@ -1,8 +1,17 @@
|
||||
//! Rust wrapper around `__switch`.
|
||||
//!
|
||||
//! Switching to a different task's context happens here. The actual
|
||||
//! implementation must not be in Rust and (essentially) has to be in assembly
|
||||
//! language (Do you know why?), so this module really is just a wrapper around
|
||||
//! `switch.S`.
|
||||
|
||||
use super::TaskContext;
|
||||
use core::arch::global_asm;
|
||||
|
||||
global_asm!(include_str!("switch.S"));
|
||||
|
||||
extern "C" {
|
||||
/// Switch to the context of `next_task_cx_ptr`, saving the current context
|
||||
/// in `current_task_cx_ptr`.
|
||||
pub fn __switch(current_task_cx_ptr: *mut TaskContext, next_task_cx_ptr: *const TaskContext);
|
||||
}
|
||||
|
Loading…
Reference in new issue