mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Merge pull request #4994 from RalfJung/affinity-tests
ensure we also test libc affinity functions on BSD
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
//@only-target: linux # these are Linux-specific APIs
|
||||
//@only-target: linux freebsd # these are Linux/FreeBSD-specific APIs
|
||||
//@compile-flags: -Zmiri-disable-isolation -Zmiri-num-cpus=4
|
||||
#![feature(io_error_more)]
|
||||
#![feature(pointer_is_aligned_to)]
|
||||
|
||||
use std::mem::{size_of, size_of_val};
|
||||
|
||||
use libc::{cpu_set_t, sched_getaffinity, sched_setaffinity};
|
||||
use libc::{sched_getaffinity, sched_setaffinity};
|
||||
|
||||
#[rustfmt::skip] // don't merge with imports above
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
use libc::cpu_set_t;
|
||||
#[cfg(target_os = "freebsd")]
|
||||
use libc::cpuset_t as cpu_set_t;
|
||||
|
||||
#[path = "../../utils/libc.rs"]
|
||||
mod libc_utils;
|
||||
|
||||
Reference in New Issue
Block a user