Skip to content

Commit

Permalink
Merge pull request #1184 from hermit-os/sys_available_parallelism
Browse files Browse the repository at this point in the history
feat(sys): add `sys_available_parallelism`
  • Loading branch information
stlankes authored May 14, 2024
2 parents b845cc5 + 1294ef3 commit 56b1ac7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/syscalls/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ pub extern "C" fn sys_get_processor_count() -> usize {
get_processor_count().try_into().unwrap()
}

#[hermit_macro::system]
pub extern "C" fn sys_available_parallelism() -> usize {
get_processor_count().try_into().unwrap()
}

/// Returns the processor frequency in MHz.
#[hermit_macro::system]
pub extern "C" fn sys_get_processor_frequency() -> u16 {
Expand Down

0 comments on commit 56b1ac7

Please sign in to comment.