pub fn thread_schedule_policy_param(
    native: ThreadId,
) -> Result<(ThreadSchedulePolicy, ScheduleParams), Error> {
    unsafe {
        let mut policy = 0 as libc::c_int;
        let mut params = ScheduleParams { sched_priority: 0 }.to_posix();

        let ret = libc::pthread_getschedparam(
            native,
            &mut policy as *mut libc::c_int,
            &mut params as *mut libc::sched_param,
        );
        match ret {
            0 => Ok((
                ThreadSchedulePolicy::from_posix(policy)?,
                ScheduleParams::from_posix(params),
            )),
            e => Err(Error::OS(e)),
        }
    }
}
/// Returns policy parameters (schedule policy and other schedule parameters)
///
/// # Usage
///
/// ```rust
/// use thread_priority::*;
///
/// let thread_id = thread_native_id();
/// assert!(thread_schedule_policy_param(thread_id).is_ok());
/// ```
Returns policy parameters (schedule policy and other schedule parameters)
Returns policy parameters ( schedule policy and other schedule parameters )
pub fn thread_schedule_policy_param(
    native: ThreadId,
) -> Result<(ThreadSchedulePolicy, ScheduleParams), Error> {
    unsafe {
        let mut policy = 0 as libc::c_int;
        let mut params = ScheduleParams { sched_priority: 0 }.to_posix();
        let ret = libc::pthread_getschedparam(
            native,
            &mut policy as *mut libc::c_int,
            &mut params as *mut libc::sched_param,
        );
        match ret {
            0 => Ok((
                ThreadSchedulePolicy::from_posix(policy)?,
                ScheduleParams::from_posix(params),
            )),
            e => Err(Error::OS(e)),
        }
    }
}
pub fn thread_schedule_policy_param ( native : ThreadId , ) -> Result < ( ThreadSchedulePolicy , ScheduleParams ) , Error > { unsafe { let mut policy = 0 as libc :: c_int ; let mut params = ScheduleParams { sched_priority : 0 } . to_posix ( ) ; let ret = libc :: pthread_getschedparam ( native , & mut policy as * mut libc :: c_int , & mut params as * mut libc :: sched_param , ) ; match ret { 0 => Ok ( ( ThreadSchedulePolicy :: from_posix ( policy ) ? , ScheduleParams :: from_posix ( params ) , ) ) , e => Err ( Error :: OS ( e ) ) , } } }
Returns policy parameters (schedule policy and other schedule parameters)
Returns policy parameters ( schedule policy and other schedule parameters )
native
ThreadId
usage
```rust
use thread_priority::*.

let thread_id = thread_native_id();
assert!(thread_schedule_policy_param(thread_id).is_ok());
```
` ` ` rust use thread_priority :: * . let thread_id = thread_native_id () ; assert! ( thread_schedule_policy_param ( thread_id ) . is_ok () ) ; ` ` `