-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f89ed9
commit fdc9575
Showing
10 changed files
with
138 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,42 @@ | ||
/// No effect for "sp-naive" use. | ||
pub fn init(_max_cpu_num: usize) {} | ||
//! Naive implementation for single CPU use. | ||
/// Returns the per-CPU data area size for one CPU. | ||
/// | ||
/// Always returns `0` for "sp-naive" use. | ||
pub fn get_local_thread_pointer() -> usize { | ||
pub fn percpu_area_size() -> usize { | ||
0 | ||
} | ||
|
||
/// No effect for "sp-naive" use. | ||
pub fn set_local_thread_pointer(_cpu_id: usize) {} | ||
|
||
/// Returns the base address of the per-CPU data area on the given CPU. | ||
/// | ||
/// Always returns `0` for "sp-naive" use. | ||
pub fn percpu_area_base(_cpu_id: usize) -> usize { | ||
0 | ||
} | ||
|
||
/// Reads the architecture-specific per-CPU data register. | ||
/// | ||
/// Always returns `0` for "sp-naive" use. | ||
pub fn read_percpu_reg() -> usize { | ||
0 | ||
} | ||
|
||
/// Writes the architecture-specific per-CPU data register. | ||
/// | ||
/// No effect for "sp-naive" use. | ||
/// | ||
/// # Safety | ||
/// | ||
/// This function is marked as `unsafe` for consistency with non "sp-naive" | ||
/// implementations. | ||
pub unsafe fn write_percpu_reg(_tp: usize) {} | ||
|
||
/// Initializes the per-CPU data register. | ||
/// | ||
/// No effect for "sp-naive" use. | ||
pub fn init_percpu_reg(_cpu_id: usize) {} | ||
|
||
/// Initialize the per-CPU data area for `max_cpu_num` CPUs. | ||
/// | ||
/// No effect for "sp-naive" use. | ||
pub fn init(_max_cpu_num: usize) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters