Skip to content

Commit

Permalink
Add pthread_attr_get_np shim
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ncMN authored and infrandomness committed Jun 21, 2022
1 parent 63d325c commit 45f6be6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/shims/unix/freebsd/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
// Return success (`0`).
this.write_null(dest)?;
}

// Linux's `pthread_getattr_np` equivalent
"pthread_attr_get_np" if this.frame_in_std() => {
let [_thread, _attr] =
this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
this.write_null(dest)?;
}
_ => return Ok(EmulateByNameResult::NotSupported),
}
Ok(EmulateByNameResult::NeedsJumping)
Expand Down

0 comments on commit 45f6be6

Please sign in to comment.