Skip to content

Commit 30b7a78

Browse files
committed
Add pthread_attr_get_np shim
1 parent f34364d commit 30b7a78

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/shims/unix/freebsd/foreign_items.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
3939
// Return success (`0`).
4040
this.write_null(dest)?;
4141
}
42+
43+
// Linux's `pthread_getattr_np` equivalent
44+
"pthread_attr_get_np" if this.frame_in_std() => {
45+
let [_thread, _attr] =
46+
this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
47+
this.write_null(dest)?;
48+
}
4249
_ => return Ok(EmulateByNameResult::NotSupported),
4350
}
4451
Ok(EmulateByNameResult::NeedsJumping)

0 commit comments

Comments
 (0)