Skip to content

Commit 56b1ac7

Browse files
authored
Merge pull request #1184 from hermit-os/sys_available_parallelism
feat(sys): add `sys_available_parallelism`
2 parents b845cc5 + 1294ef3 commit 56b1ac7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/syscalls/processor.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ pub extern "C" fn sys_get_processor_count() -> usize {
66
get_processor_count().try_into().unwrap()
77
}
88

9+
#[hermit_macro::system]
10+
pub extern "C" fn sys_available_parallelism() -> usize {
11+
get_processor_count().try_into().unwrap()
12+
}
13+
914
/// Returns the processor frequency in MHz.
1015
#[hermit_macro::system]
1116
pub extern "C" fn sys_get_processor_frequency() -> u16 {

0 commit comments

Comments
 (0)