fn extract_clone_parameters_arch<Arch: Architecture>(regs: &Registers) -> CloneParameters {
    let mut result = CloneParameters::default();
    result.stack = RemotePtr::from(regs.arg2());
    result.ptid = RemotePtr::from(regs.arg3());
    if Arch::CLONE_PARAMETER_ORDERING == CloneParameterOrdering::FlagsStackParentTLSChild {
        result.tls = RemotePtr::from(regs.arg4());
        result.ctid = RemotePtr::from(regs.arg5());
    } else if Arch::CLONE_PARAMETER_ORDERING == CloneParameterOrdering::FlagsStackParentChildTLS {
        result.tls = RemotePtr::from(regs.arg5());
        result.ctid = RemotePtr::from(regs.arg4());
    }
    let flags: i32 = regs.arg1() as i32;
    // If these flags aren't set, the corresponding clone parameters may be
    // invalid pointers, so make sure they're ignored.
    if !(flags & CLONE_PARENT_SETTID == CLONE_PARENT_SETTID) {
        result.ptid = RemotePtr::null();
    }
    if !(flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)
        == (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID))
    {
        result.ctid = RemotePtr::null();
    }
    if !(flags & CLONE_SETTLS == CLONE_SETTLS) {
        result.tls = RemotePtr::null();
    }
    result
}
/// Extract various clone(2) parameters out of the given Task's registers.
Extract various clone(2) parameters out of the given Task's registers.
Extract various clone ( 2 ) parameters out of the given Task ' s registers .
fn extract_clone_parameters_arch<Arch: Architecture>(regs: &Registers) -> CloneParameters {
    let mut result = CloneParameters::default();
    result.stack = RemotePtr::from(regs.arg2());
    result.ptid = RemotePtr::from(regs.arg3());
    if Arch::CLONE_PARAMETER_ORDERING == CloneParameterOrdering::FlagsStackParentTLSChild {
        result.tls = RemotePtr::from(regs.arg4());
        result.ctid = RemotePtr::from(regs.arg5());
    } else if Arch::CLONE_PARAMETER_ORDERING == CloneParameterOrdering::FlagsStackParentChildTLS {
        result.tls = RemotePtr::from(regs.arg5());
        result.ctid = RemotePtr::from(regs.arg4());
    }
    let flags: i32 = regs.arg1() as i32;
    // If these flags aren't set, the corresponding clone parameters may be
    // invalid pointers, so make sure they're ignored.
    if !(flags & CLONE_PARENT_SETTID == CLONE_PARENT_SETTID) {
        result.ptid = RemotePtr::null();
    }
    if !(flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)
        == (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID))
    {
        result.ctid = RemotePtr::null();
    }
    if !(flags & CLONE_SETTLS == CLONE_SETTLS) {
        result.tls = RemotePtr::null();
    }
    result
}
fn extract_clone_parameters_arch < Arch : Architecture > ( regs : & Registers ) -> CloneParameters { let mut result = CloneParameters :: default ( ) ; result . stack = RemotePtr :: from ( regs . arg2 ( ) ) ; result . ptid = RemotePtr :: from ( regs . arg3 ( ) ) ; if Arch :: CLONE_PARAMETER_ORDERING == CloneParameterOrdering :: FlagsStackParentTLSChild { result . tls = RemotePtr :: from ( regs . arg4 ( ) ) ; result . ctid = RemotePtr :: from ( regs . arg5 ( ) ) ; } else if Arch :: CLONE_PARAMETER_ORDERING == CloneParameterOrdering :: FlagsStackParentChildTLS { result . tls = RemotePtr :: from ( regs . arg5 ( ) ) ; result . ctid = RemotePtr :: from ( regs . arg4 ( ) ) ; } let flags : i32 = regs . arg1 ( ) as i32 ; // If these flags aren't set, the corresponding clone parameters may be // invalid pointers, so make sure they're ignored. if ! ( flags & CLONE_PARENT_SETTID == CLONE_PARENT_SETTID ) { result . ptid = RemotePtr :: null ( ) ; } if ! ( flags & ( CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID ) == ( CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID ) ) { result . ctid = RemotePtr :: null ( ) ; } if ! ( flags & CLONE_SETTLS == CLONE_SETTLS ) { result . tls = RemotePtr :: null ( ) ; } result }
Extract various clone(2) parameters out of the given Task's registers.
Extract various clone ( 2 ) parameters out of the given Task ' s registers .
regs
&Registers