MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / convert

Function convert

src/backend/linux_raw/runtime/syscalls.rs:267–272  ·  view source on GitHub ↗

If we don't have a timeout, or if we can convert the timeout to a `__kernel_old_timespec`, the use `__NR_futex`.

(timeout: &Timespec)

Source from the content-addressed store, hash-verified

265 // If we don't have a timeout, or if we can convert the timeout to
266 // a `__kernel_old_timespec`, the use `__NR_futex`.
267 fn convert(timeout: &Timespec) -> Option<__kernel_old_timespec> {
268 Some(__kernel_old_timespec {
269 tv_sec: timeout.tv_sec.try_into().ok()?,
270 tv_nsec: timeout.tv_nsec.try_into().ok()?,
271 })
272 }
273 let old_timeout = if let Some(timeout) = timeout {
274 match convert(timeout) {
275 // Could not convert timeout.

Callers 1

kernel_sigtimedwaitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected