We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f04e3df + 4333e72 commit 7994bd5Copy full SHA for 7994bd5
library/std/src/sys/thread/unix.rs
@@ -314,13 +314,10 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
314
target_os = "vxworks" => {
315
// Note: there is also `vxCpuConfiguredGet`, closer to _SC_NPROCESSORS_CONF
316
// expectations than the actual cores availability.
317
- unsafe extern "C" {
318
- fn vxCpuEnabledGet() -> libc::cpuset_t;
319
- }
320
321
// SAFETY: `vxCpuEnabledGet` always fetches a mask with at least one bit set
322
unsafe{
323
- let set = vxCpuEnabledGet();
+ let set = libc::vxCpuEnabledGet();
324
Ok(NonZero::new_unchecked(set.count_ones() as usize))
325
}
326
0 commit comments