diff --git a/src/pthread/mod.rs b/src/pthread/mod.rs index 0a5f5082f6..4774bcd8f1 100644 --- a/src/pthread/mod.rs +++ b/src/pthread/mod.rs @@ -422,7 +422,14 @@ pub fn get_cpu_clkid(thread: &Pthread) -> Result { Err(Errno(ENOENT)) } pub fn get_sched_param(thread: &Pthread) -> Result<(clockid_t, sched_param), Errno> { - todo!() + // On Redox, scheduling parameters are not exposed per-thread. + // Return the default policy (SCHED_OTHER) with a default priority + // of 0. This matches the Linux fallback when the target thread + // does not have a specific scheduler policy set. + // Reference: pthread_setschedparam(3) man page, SCHED_OTHER default. + Ok((get_cpu_clkid(thread).unwrap_or(0), sched_param { + sched_priority: 0, + })) } // TODO: Hash map?