pub fn validate_signal_num(num: c_int, for_vcpu: bool) -> errno::Result<c_int> {
    if for_vcpu {
        let actual_num = num + SIGRTMIN();
        if actual_num <= SIGRTMAX() {
            return Ok(actual_num);
        }
    } else if SIGHUP <= num && num <= SIGSYS {
        return Ok(num);
    }
    Err(errno::Error::new(EINVAL))
}
/// Verifies that a signal number is valid: for VCPU signals, it needs to be enclosed within the OS
/// limits for realtime signals, and the remaining ones need to be between the minimum (SIGHUP) and
/// maximum (SIGSYS) values.
Verifies that a signal number is valid: for VCPU signals, it needs to be enclosed within the OS
limits for realtime signals, and the remaining ones need to be between the minimum (SIGHUP) and
maximum (SIGSYS) values.
Verifies that a signal number is valid : for VCPU signals it needs to be enclosed within the OS limits for realtime signals and the remaining ones need to be between the minimum ( SIGHUP ) and maximum ( SIGSYS ) values .
pub fn validate_signal_num(num: c_int, for_vcpu: bool) -> errno::Result<c_int> {
    if for_vcpu {
        let actual_num = num + SIGRTMIN();
        if actual_num <= SIGRTMAX() {
            return Ok(actual_num);
        }
    } else if SIGHUP <= num && num <= SIGSYS {
        return Ok(num);
    }
    Err(errno::Error::new(EINVAL))
}
pub fn validate_signal_num ( num : c_int , for_vcpu : bool ) -> errno :: Result < c_int > { if for_vcpu { let actual_num = num + SIGRTMIN ( ) ; if actual_num <= SIGRTMAX ( ) { return Ok ( actual_num ) ; } } else if SIGHUP <= num && num <= SIGSYS { return Ok ( num ) ; } Err ( errno :: Error :: new ( EINVAL ) ) }
Verifies that a signal number is valid: for VCPU signals, it needs to be enclosed within the OS
limits for realtime signals, and the remaining ones need to be between the minimum (SIGHUP) and
maximum (SIGSYS) values.
Verifies that a signal number is valid : for VCPU signals it needs to be enclosed within the OS limits for realtime signals and the remaining ones need to be between the minimum ( SIGHUP ) and maximum ( SIGSYS ) values .
num
c_int
for_vcpu
bool
num
c_int
for_vcpu
bool