Skip to content

Commit

Permalink
Add shim for libc::sysconf(libc::_SC_NPROCESSORS_CONF)
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Jan 22, 2021
1 parent 6fdda8a commit 2aedbf0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shims/posix/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx

let sysconfs = &[
("_SC_PAGESIZE", Scalar::from_int(PAGE_SIZE, this.pointer_size())),
("_SC_NPROCESSORS_CONF", Scalar::from_int(NUM_CPUS, this.pointer_size())),
("_SC_NPROCESSORS_ONLN", Scalar::from_int(NUM_CPUS, this.pointer_size())),
];
let mut result = None;
Expand Down

0 comments on commit 2aedbf0

Please sign in to comment.