Skip to content

Commit 2aedbf0

Browse files
committed
Add shim for libc::sysconf(libc::_SC_NPROCESSORS_CONF)
1 parent 6fdda8a commit 2aedbf0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/shims/posix/foreign_items.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
180180

181181
let sysconfs = &[
182182
("_SC_PAGESIZE", Scalar::from_int(PAGE_SIZE, this.pointer_size())),
183+
("_SC_NPROCESSORS_CONF", Scalar::from_int(NUM_CPUS, this.pointer_size())),
183184
("_SC_NPROCESSORS_ONLN", Scalar::from_int(NUM_CPUS, this.pointer_size())),
184185
];
185186
let mut result = None;

0 commit comments

Comments
 (0)