Skip to content

Commit

Permalink
feat(sys): add sys_available_parallelism
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed May 13, 2024
1 parent d32c082 commit 1294ef3
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 1294ef3

Please sign in to comment.